fix for contact form 7 refill issue

fix for contact form 7 refill issue

If you’re using the Contact Form 7 plugin and have a performance issues with refill request, the solution is fairly simple.  The error listed on the image above could be seen on Page Speed Insights, GTMetrix, Pingdom or on other services that are measuring your site loading time.

To fix this issue, log in to your hosting panel (or FTP), go to file manager, navigate to: WP-Content > Plugins >  Contact Form 7 > Includes folder and open up the controller.php file in your text editor.   Find these 3 lines of text, remove them from the file and hit save.

	if ( defined( 'WP_CACHE' ) && WP_CACHE ) {
		$wpcf7['cached'] = 1;
	}

After you remove this code, retest your site speed and you’ll see that refill error no longer exist.  If you’re using any caching plugins, don’t forget to clear the cache.

Currently, this is only a temporary fix and each time when you update the Contact Form 7 plugin, you’ll have to manually delete the code listed above.  This fix may cause an issue with Captcha feature, so if you’re using any kind of Captcha protection, doublecheck is it working ok.

Hopefully the plugin author will provide a long-term solution in some future update.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *