HowTo: Fix AJAX Problems in WP-Email, WP-Polls, WP-PostRatings or WP-PostViews Plugins

wordpress logo

Some of the most popular or more commonly used WordPress plugins in the community are plugins created by Lester Chan. About a two weeks ago, he released an update for the WP-Email, WP-Polls, WP-PostRatings and WP-PostViews plugins that included some changes like assigning the /wp-admin/admin-ajax.php file to handle AJAX requests.

Due to those changes some users are experiencing AJAX-related problems. Below are the two most common issues:

  • “-1″ or “Failed To Verify Referrer” – This means that most likely you are using a caching plugin like W3 Total Cache (W3TC) and the Javascript being minified/combined and cached is outdated.
  • Password Protected /wp-admin/ Will Not Work – If you are using .htpasswd to protect your wp-admin folder, AJAX request to wp-admin/admin-ajax.php will not work. This problem is not unique to my plugin. Any WordPress Plugins that uses the WordPress AJAX API will break.
  • Your WP-Admin Is HTTPS While Your Site Is Not – If your WP-Admin is behind SSL aka HTTPS and you have the following config in your wp-config.php define('FORCE_SSL_ADMIN', true);, the AJAX will fail because is different from and the browser treat it as different domain.

If you are using any of these plugins: WP-Polls, WP-PostRatings or WP-PostViews and are experiencing any AJAX problems or AJAX-related issues like the ones listed above, please check out Lester Chan’s most recent blog post for further details regarding the issues and how to fix them.

This post may contain affiliate links that allow us to earn commissions at no additional cost to you. We are reader-supported so when you buy through the affiliate links, you are also helping or supporting us. 


Leave a Reply

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