Forum Replies Created
-
AuthorPosts
-
June 6, 2017 at 8:49 am in reply to: Failed to load resource: the server responded with a status of 403 (Forbidden) #804391
@Rikard,
I’m now experiencing the same problem, on the same website, with the increased memory limits as posted earlier.
Again, this is happening with just 1 page (a different one to last time). The higher resource limits fixed the page I initially had issues with, but now, a different page has the same problem of the Avia layout builder not loading.I’ve dug deeper into the problem, and every creative solution I’ve tried hasn’t restored access to the Avia layout building inside the page in question.
Chrome console tells me:
VM8950:1 POST http://www.####.com.au/wp-admin/admin-ajax.php 403 (Forbidden)
I’ve noticed that if I visit this page too much, my hosting firewall automatically blocks my IP, which I then have to go and manually Unblock from the hosting portal (I’m a reseller so I have this kind of access)
Furthermore, I’ve seen a couple of posts online that say that WordFence can sometimes block a connection to this file (wp-admin/admin-ajax.php) as a false positive, but I have disabled WordFence and the problem still persists.
I also tried disabling a plugin called “Cache External Scripts” thinking it might be the culprit, still no luck.
I then tried disabling my caching plugin, even though the POST request from admin-ajax.php is set to no-cache, I thought it might be causing issues. Still, nothing, didn’t make a difference.
Finally, I disabled ALL plugins on the site, and the problem is still happening.
I can confirm that the server is indeed using the higher resource limits set in default-constants.php and in .htaccess as well.
My permission structure is as follows;
public_html (web root) – 0750
\ wp-admin – 0755
\ wp-admin \ admin-ajax.php – 0644Also note, even though I have disabled all plugins, some settings still remain (.htacess etc) I have whitelisted my IP address and also made sure that my IP isn’t being blocked by the host server.
I’m really lost as to what the solution might be.
I’ve noticed as well, this has happened a couple of times when adding a “Fullwidth button” in the Avia layout builder, as well as “Icon” elements. After saving, the page will then reload as normal, but the Avia editor doesn’t fully load. Animated icon for the Avia editor spins infinitely.
I can also see that the POST method is sending the raw Avia shortcode to admin-ajax.php but is being blocked for some reason…
The weirdest part is… When I “restore” a revision from before I’ve added or changed whatever it was to make the layout editor break (with the blocked admin-ajax.php), it works! But in some cases, this can mean losing hours of work, plus the hours spent trying to diagnose the problem.
Basically I have to then avoid making the same changes (such as adding an icon with a link) to something like, adding an image with the same link, in order to not repeat the same steps and potentially break the page again. Incredibly frustrating and thankfully I have full control over the design of my client’s websites but this issue has only come up in the last couple of versions of Enfold. Everything prior to v4 never did this.
Some insight would be nice, or maybe this a deeper bug that has come up in the last couple of versions? I’m not a PHP or Ajax developer so I can’t fully debug the problem.
For anyone else with this issue, try restoring your page to earlier Revision and see if that helps, even though you’ll probably lose a lot of work, it has been the only consistant solution for me with this particular issue, apart from higher server resource limits, which you should always do anyway :P
Cheers, Jenkins
May 24, 2017 at 8:45 am in reply to: Failed to load resource: the server responded with a status of 403 (Forbidden) #798773For anyone else experiencing this issue, I have found the root cause, and it isn’t any plugin or link within the page (but only if you are having issues with the Avia advanced layout editor — and it’s not showing anything)
It’s the WordPress Memory Limit set via PHP and/or .htaccess!
In .htaccess, add the following:
php_value post_max_size 512M php_value upload_max_filesize 512M php_value max_input_vars 5000 php_value max_execution_time 300 php_value max_input_time 300 php_value memory_limit 512M
In wp-includes folder, navigate to default-constants.php, scroll down to around line 35 and change “64M” and “40M” to reflect your new .htaccess memory limits.
e.g;// Define memory limits. if ( ! defined( 'WP_MEMORY_LIMIT' ) ) { if ( false === wp_is_ini_value_changeable( 'memory_limit' ) ) { define( 'WP_MEMORY_LIMIT', $current_limit ); } elseif ( is_multisite() ) { define( 'WP_MEMORY_LIMIT', '512M' ); } else { define( 'WP_MEMORY_LIMIT', '256M' ); } }
This will force WordPress to use 256MB of Memory on a single-site installation, and 512MB of Memory on a Multi-site installation.
Note: Some hosting providers do not allow you to change this or have smaller limits, so consult them if you can’t modify .htaccess and/or default-constants.php
Cheers, Jenkins
-
AuthorPosts