Thread Starter
Dan14
(@dan14)
504 timeout. What script should I add to functions.php to dequeue it? There are 2 js scripts Im trying to remove from loading in wp-admin.
Please try installing https://wordpress.org/plugins/enable-jquery-migrate-helper/ to see if that fixes the issue.
Also, check the browser console for errors.
This may be a plugin or theme conflict. Please attempt to disable all plugins, and use one of the default (Twenty*) themes. If the problem goes away, enable them one by one to identify the source of your troubles.
If you can install plugins, install “Health Check”: https://wordpress.org/plugins/health-check/ On the troubleshooting tab, you can click the button to disable all plugins and change the theme for JUST you, while you’re still logged in, without affecting normal visitors to your site. You can then use its admin bar menu to turn on/off plugins and themes one at a time. See https://make.wordpress.org/support/handbook/appendix/troubleshooting-using-the-health-check/ or https://rankmath.com/kb/check-plugin-conflicts/ for more information.
See http://www.wpbeginner.com/plugins/how-to-deactivate-all-plugins-when-not-able-to-access-wp-admin/
Thread Starter
Dan14
(@dan14)
I disabled jquery migrate a long time ago via a plugin. I dont think its related, site health is good. The 504’s are server-related I believe and its clogging my wp-admin. I would rather just dequeue those scripts from loading in the backend. T
Thread Starter
Dan14
(@dan14)
In the console I have this message: load-scripts.php?c=0&load[chunk_0]=jquery-core,jquery-migrate,utils&ver=5.6:5 JQMIGRATE: Migrate is installed, version 3.3.2
That’s not particularly easy to do. See, all those jQuery UI scripts are dependencies of each other. Removing the checkboxradio script would also remove the button script, which would remove dialog and spinner. This would in turn remove wpdialogs. Basically, a bunch of stuff just up and stops working.
If you’re getting a 504 error for the file, then you are correct about it being a server thing, but a simpler fix would be to simply check the file. See if it has the correct file permissions, the same as the other files around it. If it has the wrong permissions or file ownership, then the server can’t read it, and thus the server error. This is something you should be able to check for yourself on any hosting system.
“504 Gateway Timeout server error response code indicates that the server, while acting as a gateway or proxy, did not get a response in time from the upstream server that it needed in order to complete the request. ”
This would indicate that you are perhaps using a CDN or other sort of proxy
If you are then perhaps there is a method of bypassing it and accessing local copies when in admin pages
Thread Starter
Dan14
(@dan14)
Thank you all for your replies. I am using a CDN, thats correct. Full site delivery. I can create a rule to bypass cache for that specific file and see how it goes.
The part I do not quite understand is that when /wp-includes/js/jquery/ui/checkboxradio.min.js is called it triggers 504. When I add ?nocache=1 to the url /wp-includes/js/jquery/ui/checkboxradio.min.js?nocache=1 the file loads (200). This is all CDN related?
(Update: Its not cached by the CDN, all requests in wp-admin are proxied from the server)
-
This reply was modified 5 years, 3 months ago by
Dan14.
-
This reply was modified 5 years, 3 months ago by
Dan14.
Yes CDN related.
Bonus points to me 🙂
edit…
(Update: Its not cached by the CDN, all requests in wp-admin are proxied from the server)
ummm – are you also using a caching plugin
less bonus points to me 🙂
-
This reply was modified 5 years, 3 months ago by
fullworks.
Thread Starter
Dan14
(@dan14)
Well yes, you pretty much figured I am using a CDN. I cant tell if its a caching issue. WordPress loads over 20 files, 1 file getting 504, and to say it is caching, its even not a js I use…
The temporary solution to this is a 301 redirect to ?nocache=1 and that fixed it. I am going to find out where the host is blocking some of the CDN ips that could also result in 504.