Contact Form 7 refill issues. FAQs and Fixes.

Disclosure: This post contains affiliate links. I may receive compensation when you click on links to products in this post. For an explanation of my Advertising Policy, visit this page. Thanks for reading!

Why does Contact Form 7 have a refill function?

The Contact Form 7 refill function was created to make the form more responsive to users input without having to make constant requests to your server to retrieve each request. 

You see, cached pages always show static content. 

Therefore, when a Captcha script detects a page is cached it is sent to the server. The server then answers the request with a fresh new quiz, a brand new distorted image for verification, etc. 

The refill function only loads when you’re using some type of page caching function. 

The purpose of the refill is to prevent conflicts with existing plugins and their own caching functions when they make use of page caching. 

This is how Contact Form 7 is supposed to work. So you can use a dedicated caching plugin and the captcha built into Contact Form 7 together. 

In this post, I’m going to go over the most common issues people have with the Contact Form 7 refill function as well as possible fixes and solutions to them.  

What are the main Contact Form 7 issues with its refill function?

Contact Form 7 sometimes has issues with its refill function and the top 3 causes are:

  1. Either your caching function in your Contact Form 7 is turned off or your Caching plugin is turned off.
  2. Caching plugin conflict.
  3. Plugin conflict. 

You will find that 90% of all Contact Form 7 refill issues stem from one or more of those 3 causes. 

Contact Form 7 refill functions can actually cause a site to go down.

If you’re not using the captcha functionality on Contact Form 7, but you are caching your pages, this can cause a site to go down. 

This is because the captcha request will load multiple times with every page load. 

This can overload your server, causing site outages or worse.

For example if you have an issue with your site going down due to high requests on the site’s servers, like this one: /wp-json/contact-form-7/v1/contact-forms/10370/refill. 

If this is the case, you should try switching to the default theme. Then deactivate all plugins excluding Contact Form 7, the Classic Editor and WP Mail SMTP, and clearing the cache.

Then reactivate your plugins one by one to see if there is a conflict. Then the theme. When you find the conflict, contact either the theme or plugin’s developer’s support and take it from there.

In fact, the number one solution to Contact Form 7 refill issues is to basically look for conflicts.

Deactivating all your plugins, switching to a default theme, then reactivating them one by one until you find the conflict.

Actually many WordPress issues can be solved this way.

Another example is if you are using Gtmetrix and have seen this file: /wp-json/contact-form-7/v1/contact-forms/13891/refill, is causing slow page loading speeds. 

You may be able to solve this problem by using “Plugin Logic” and only load Plugins on pages where you need them, e.g. Contact Form 7 and only on pages where you have forms. 

“Plugin Logic” hasn’t been updated in a while, so read the latest reviews and proceed with caution. But, if it still works, then why not? Especially if you’re a non-coder like myself.

Besides, it really speeds up the loading time. 

How to fix a Contact Form 7 showing a 404 on a refill request.

Sometimes when validating a form, the Contact Form 7 may show the spinning arrow icon never stopping. 

The error may show up in your Chrome’s Developer Console like this: jquery.js?ver=1.12.4:4 POST http://XXX/wp-json/contact-form-7/v1/contact-forms/158/feedback 401 (Unauthorized)

If you deactivate Contact Form 7 globally, you will then need to create a plugin filter with http://XXX/wp-json/contact-form-7/v1/contact-forms/ as the permalink and select “also affect children”.

But you will also need to enable the fuzzy URL matching on the Plugin Organizer settings page. 

So, globally disable Contact Form 7. Then create a plugin filter with Contact Form 7 enabled and set the permalink to: 

http://www.mydomain.com/wp-json/contact-form-7/v1/contact-forms/. Don’t forget to check the “affect children” checkbox.

WP Super Cache/Contact Form 7 conflict.

If you have WP Super Cache installed, you should try clearing the caching either on a specific page or sitewide. 

Sometimes caching plugins cache an old version of the recaptcha-controls script included in this plugin. 

So, cache clearing seems to be the preferred solution.

However, if you find this doesn’t work, try reaching out to WP Super Cache and see if there’s a way to exclude the wpcf7-recaptcha-controls script to the cache exclusion list. 

How to speed up Contact Form 7

If you find that Contact Form 7 is slowing down your site, you could also try this plugin Speed up Contact Form 7.

As the plugin says, it makes Contact Form 7, reCaptcha and add-ons to load only if there’s a shortcode. 

This decreases the number of unused CSS and JavaScript and makes PageSpeed a little happier (and faster).

How to fix a possible Contact Form 7 feedback 403 error.

“403 Forbidden Access to this resource on the server is denied!” WordPress gives developers access to a JSON API. Contact Form 7 uses it to try to get some settings for your form. 

The server may give a “403 forbidden error” to any user not logged in. However, for Admin users it works fine.

If this is the case for you, immediately suspect the problem is plugin related. 

For you, it could be your caching plugin, which by the way, disables itself if an Admin is logged in.

Simply, try another caching plugin or flush the cache on the one you have. Problem solved! Hopefully…

W3 Total Cache/Contact Form 7 conflict.

If you have updated Contact Form 7 to its latest version and the send button is blocked, no longer sending emails or spinning to infinity, you may have a minifying conflict.

It seems sometimes Contact Form 7 doesn’t like minifying under certain conditions and settings of the hosting’s servers.

Here’s a possible solution. Try the following:

Go to Performance -> Minify -> Never minify the following pages: and manually add the page where you have the Contact Form, without http:// or/and www. 

For example, if the page is “Contact”, add /contact/

This solution may not be a universal one, but it may work.

Getting a “Failed to load resource: the server responded with a status of 403 ()”

“Failed to load resource: the server responded with a status of 403 ()”

Many of these issues may again have to do with Caching. Try installing the “Health Check and Troubleshooting” plugin and follow their documentation to narrow down any plugin conflicts.

One final note: Don’t forget to make sure you’re running the latest version of WordPress and that Contact Form 7 is also updated.

Contact Form 7 refill issues, final thoughts.

As you can see, with most common Contact Form 7 refill issues, there’s an underlying thread. 

There’s either a plugin conflict, a caching conflict or the settings haven’t been configured correctly. 

If you focus on those areas first along with some of the possible fixes I have given above, you should be able to take care of 90% of all Contact Form 7 refill issues. 

If not, you can always go to Contact Form 7s Support page in WordPress.org and file a support ticket.

Web hosting in Iceland - OrangeWebsite.com