Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#493 Yesterday 10:49:53

Gallex
Member
Registered: 2006-10-08
Posts: 1,325

Re: com_connect - form and contact mailer

Bloke wrote #341652:

Sorry, documentation isn’t complete. As long as you uploaded/installed the full ext_captcha.zip bundle (which includes the required ReCaptcha files) try this inside your <txp:com_connect> container tag:

<txp:ext_captcha type="recaptcha" />...

The type attribute defaults to hcaptcha, which is why it tries to use it.

stef, is here all the required files?

i added your new code inside com_connect. but i can’t see robot on webpage. want to look?

Offline

#494 Yesterday 11:02:24

Gallex
Member
Registered: 2006-10-08
Posts: 1,325

Re: com_connect - form and contact mailer

and if i submit that form i got bunch of errors:

/txp:com_connect> ->  8192: Constant FILTER_SANITIZE_STRING is deprecated while parsing form test_paring on page default_est
textpattern/lib/txplib_misc.php:1662 ext_captcha_submit()
textpattern/plugins/com_connect/com_connect.php:210 callback_event()
com_connect()
textpattern/vendors/Textpattern/Tag/Registry.php:140 call_user_func()
textpattern/lib/txplib_publish.php:540 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:429 processTags()
textpattern/lib/txplib_misc.php:3677 parse()
textpattern/publish/taghandlers.php:446 parse_form()
output_form()
textpattern/vendors/Textpattern/Tag/Registry.php:140 call_user_func()
...
</txp:com_connect> ->  8192: Constant FILTER_SANITIZE_STRING is deprecated while parsing form test_paring on page default_est
textpattern/lib/txplib_misc.php:1662 ext_captcha_submit()
textpattern/plugins/com_connect/com_connect.php:210 callback_event()
com_connect()
textpattern/vendors/Textpattern/Tag/Registry.php:140 call_user_func()
textpattern/lib/txplib_publish.php:540 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:429 processTags()
textpattern/lib/txplib_misc.php:3677 parse()
textpattern/publish/taghandlers.php:446 parse_form()
output_form()
textpattern/vendors/Textpattern/Tag/Registry.php:140 call_user_func()
...
</txp:com_connect> ->  8192: Constant FILTER_SANITIZE_STRING is deprecated while parsing form test_paring on page default_est
textpattern/lib/txplib_misc.php:1662 ext_captcha_submit()
textpattern/plugins/com_connect/com_connect.php:210 callback_event()
com_connect()
textpattern/vendors/Textpattern/Tag/Registry.php:140 call_user_func()
textpattern/lib/txplib_publish.php:540 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:429 processTags()
textpattern/lib/txplib_misc.php:3677 parse()
textpattern/publish/taghandlers.php:446 parse_form()
output_form()
textpattern/vendors/Textpattern/Tag/Registry.php:140 call_user_func()
...
</txp:com_connect> ->  8192: Creation of dynamic property ReCaptcha\ReCaptcha::$hostname is deprecated while parsing form test_paring on page default_est
textpattern/plugins/ext_captcha/ext_captcha.php:163 ReCaptcha\ReCaptcha->setExpectedHostname()
textpattern/lib/txplib_misc.php:1662 ext_captcha_submit()
textpattern/plugins/com_connect/com_connect.php:210 callback_event()
com_connect()
textpattern/vendors/Textpattern/Tag/Registry.php:140 call_user_func()
textpattern/lib/txplib_publish.php:540 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:429 processTags()
textpattern/lib/txplib_misc.php:3677 parse()
textpattern/publish/taghandlers.php:446 parse_form()
output_form()

but i receive the mail

Offline

#495 Yesterday 11:07:39

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,188
Website GitHub

Re: com_connect - form and contact mailer

Gallex wrote #341653:

stef, is here all the required files?

Yes, as long as the library files are also in the ReCaptcha fokder, you should be good to go.

i added your new code inside com_connect. but i can’t see robot on webpage.

That’s weird. Your site shows the plugin is loading, but nothing is being added to the page.

Start up the web inspector console, visit the Console or Network panels and refresh the website page with the captcha on it. Are there any errors thrown? Google may have changed their API or there could be some security setting that is forbidding the captcha from loading cross-domain. I can’t see any major errors (assuming it’s the kyla one you were referring to yesterday).

FILTER_SANITIZE_STRING

… means the plugin is at least running on submission. It will need updating to remove that constant and do sanitization a different way. I’ll fix that as soon as I can.

Creation of dynamic property ReCaptcha\ReCaptcha::$hostname is deprecated

That’s Google’s shoddy code. I expect they’ve fixed it in a later version of the ReCaptcha API files, so I’ll grab those when I fix the SANITIZE_STRING warning.

Last edited by Bloke (Yesterday 11:11:47)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#496 Yesterday 11:17:49

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,188
Website GitHub

Re: com_connect - form and contact mailer

Bloke wrote #341655:

That’s Google’s shoddy code. I expect they’ve fixed it in a later version of the ReCaptcha API files

Yes they have

BUT

Google is sunsetting the free version of this API at the end of 2025. Going forward you will be required to use the Enterprise version. This version will remain free till the end of the year, then over 10K requests a month you have to pay about $8 a month or more.

Quelle surprise.

In the meantime, if you want a PHP 8.4 compatible library, check out: phpfui/recaptcha. Should be a drop in replacement.

I’ll do that instead then 😁

(and it also supports PHP 8.5)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#497 Yesterday 11:48:57

Gallex
Member
Registered: 2006-10-08
Posts: 1,325

Re: com_connect - form and contact mailer

Bloke wrote #341655:

Start up the web inspector console, visit the Console or Network panels and refresh the website page with the captcha on it. Are there any errors thrown? Google may have changed their API or there could be some security setting that is forbidding the captcha from loading cross-domain. I can’t see any major errors (assuming it’s the kyla one you were referring to yesterday).

yes, the same page. if you can’t see yourself, then this part is ok, i assume…

Offline

#498 Yesterday 11:52:55

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,188
Website GitHub

Re: com_connect - form and contact mailer

Gallex wrote #341657:

yes, the same page. if you can’t see yourself, then this part is ok, i assume…

Yes, but the bizarre thing is if you look in the page source code, the hidden captcha form element and JavaScript code have NOT been added to the page. I’ve no idea why that would be.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB