Written by Bram Koster
Last updated 9 months ago
Sometimes an AJAX call will fail, this can have multiple causes. For example a firewall blocking AJAX calls, a plugin with a error message, request timeout, etc.
AJAX is a request method completely running in the background. Without reloading the page you can get new content, save settings, etc. You can recognise if it’s AJAX when you see new content showing up or after saving something and the page doesn’t reload.
For this you need a PC/notebook (mobile or tablet will not work). In this tutorial we will only explain how it works in Chrome, different browsers will use different techniques. If you are not using Chrome you can download it for free. After opening Chrome and browsing to the page where you have a problem with AJAX please click with the right button somewhere on the page and click ‘Inspect Element’. This will open up Chrome Developer Tools. After that go to the networking tab and select the funnel icon and select XHR. This will filter out all AJAX calls. Now reproduce the thing you were doing (save/submit/etc.). You will now see the AJAX calls appearing. You can click on them and then click on the ‘Preview’ tab. Over here you can see the exact error causing the problem.
I see a white screen?
This is most of the time a PHP error. In this case please enable Debugging in WordPress and follow the steps again. Now you will see the exact PHP error.
I see BladeWP Firewall: Request Blocked?
This is because you have AJAX calls blocked in our firewall. Please go to the control panel, select the environment you are working on and go to the Security section. Over there you will find the ‘Block AJAX calls’ option.
© BladeWP - Dedicated WordPress Hosting | 2013 - 2021 | All rights reserved
Made with ❤ in the Netherlands