Error message when processing donation
-
Hello Charitable support,
I have been able to successfully receive donations on my donation form. However, some donors have been receiving the following error when they click to complete my donation form:
“An error occurred while processing your donation. Unable to submit form. Please try again. Unfortunately we were unable to verify your form submission. Please reload the page and try again.”
I have done my best to troubleshoot this error by 1) doing a cache flush, 2) removing any cache plugins, 3) making sure my php and wordpress versions are both up-to-date, and lastly, 4) deactivating and removing spam protection plugins like ReCAPTCHA and Cloudfare.
All of these problem solving attempts have been made over this last week. I will get an error, attempt a correction, try to donate, and the error goes away. Then a couple days later I’ll get the same error again, and I’ll try the next problem solving idea. All that to say that I did not do all of the above problem solving attempts at once, but instead have tried something new each time I get the error.
At this point it has been a week since I’ve had this error and I am beginning to become concerned about losing out on donors who have attempted to donate but have been unable to. I’d like to ask for your help with this so that I can be sure donors are able to use the form error-free.
Thank you so much for your time and knowledge!
The page I need help with: [log in to see the link]
-
@armenta Thanks for reaching out.
Yes, that error usually shows up when the security nonce can’t be validated for some reason. It’s usually related to caching. Even if you have removed cache plugins, ensure that your hosting company hasn’t perhaps any server-side caching (check your control panels). You don’t have to disable caching completely, just disallows the URLs for caching where the donation forms appear.
You can also try this snippet, which disables the check: https://library.wpcode.com/snippet/7oq3yl5w/
We don’t usually recommend this, but has worked in the past when other attempts haven’t produced enough results (and might allow you to restore CAPTCHA solutions).
Hope this helps! Let me know if you have any questions.
Hi again @dimensionmedia.
I am hosting with GoDaddy and I am utilizing Managed WordPress. I am getting the error daily. I have begun to manually flush the cache every morning in GoDaddy’s WordPress Hosting settings and that seems to last all day. Then I repeat the process the next morning.
Regarding your suggestion about the hosting company, I doubt I will have success getting GoDaddy to disable their server cache.
Will you please speak more on the snippet that disables the check? What are the vulnerabilities after disabling? It sounds like something that shouldn’t be done but alternatively I am having to flush the cache daily just to ensure the donation form can function properly.
Thanks again.
@armenta Charitable adds a security “nonce” so that each donation is unique and checked. It sounds like your cache is “caching” that unique “nonce” on page loads which is causing the issue. The snippet removes that so it’s technically less secure hence we don’t usually recommend this. But has worked in the past and as a I mentioned when other attempts haven’t produced enough results (and might allow you to restore CAPTCHA solutions).
There SHOULD be a way to add your page(s) to an “ignore” list but you would need to contact GoDaddy about this. You shouldn’t have to manually clear the cache (that’s crazy).
Hope this helps! Let me know if you have any questions.
@dimensionmedia Okay I have gone ahead and added the snippet that removes the unique nonce. I also re-activated Contact Form 7 Captcha, specifically the Cloudfare Turnstile Captcha. I’m attempting to insert the [cf7sr-turnstile] to the form but many of my form questions are added via Snippets. Can you help me figure out where I should insert this so that it displays before the ‘Donate’ button as recommended?
-
This reply was modified 6 months ago by
Armenta.
@armenta There is a hook that can render something before the donation button on forms.
add_action( 'charitable_form_after_fields', function( $form, $view_args ) {
echo do_shortcode('[cf7sr-turnstile]');
}, 10, 2 );That should do what you are asking. As for it working as you intended, you might want to reach out to Contact Form 7 if you need support. And again, we would also suggest investigation of selectively deactivating cache on your site for certain pages.
Hope this helps!
We are going to go ahead and close this thread for now. But if you’d like us to assist further, please feel welcome to continue the conversation.
Thanks!
-
This reply was modified 6 months ago by
You must be logged in to reply to this topic.