I'm running CiviCRM 5.53 on a Wordpress 6 site.

I have a Civi contribution page set up to be a membership form. The profile used on the form is configured to use reCaptcha, and the reCaptcha is correctly configured with an API key etc.

With the form injected into a Wordpress page using a shortcode, which is my preferred option, the reCaptcha is not displayed and the form consequently generates an error when the user tries to submit the form. Of course as the user can't see the reCaptcha they can't complete it, and so the form can't be submitted.

If I view the Contribution page - https://mysite.tld/civicrm/contribute/transact/?reset=1&id=5 - as an unauthenticated user then I can see and respond to the reCaptcha.

This is a recently introduced issue, as this site has been running flawlessly for several years. I'm assuming that it has arisen as a consequence of recent Civi and/or Wordpress updates.

Looking at the browser console, the shortcode version of the form shows a series of errors of the type:

Syntax error: Unexpected token '<'

which are not present in the console for the contribution page.

  • Can you have a look at your PHP and CiviCRM logs and add any errors you find there? Oct 13, 2022 at 10:58


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.