What form of caching system do you use? Do you use a server side caching plugin? CloudFlare? An nginx proxy?
Clear. The. Cache.
@otto42 Hi Samuel, i’ve removed all caching systems, server side as well. We run our own PLESK Linux server so we have complete control. Still the same issue persists.
I believe that the issue persists, however it persists because you are still loading old JS files from your site, when you should be loading new ones. So, there is some cache, somewhere, sitting in between you and your site, giving you the old files and causing conflicts like these.
Figure out what is causing your browser to not get the new Javascript file from your sevrer, and you will solve your problem.
@otto42 i dont know how i can be more clear. There is NO caching system. not on the server, not wordpress side. All old cache folders have been deleted. No nginx caching. No Additional nginx directives for caching. No wordpress caching plugins.
Okay, that is great. So now, your job is to figure out why you’re still getting old files.
Compare the contents of these files in your browser using your browser’s tools with the actual contents of the same files in the WordPress install. Are they identical? If not, then you need to know why. Because that mismatch of old and new code mixing together is causing your error.
We can talk all day about caches and such, but in the end, you have old code in the browser and new code on the server, and you need to find why that is happening.
Hi @otto42 ive already compared files with Kaleidoscope. All files served from the compared to a fresh WordPress 5.4 file downloaded and all the files are identical.
If that was true, then you would not be getting errors in the browser.
Maybe the browser is caching the files? If you have some code in your htaccess or similar to set long browser cache times, then that could be the case.
Alternatively, maybe you have a plugin interfering with the page content which causes this problem. Disable your plugins and try it without them would be the standard debugging approach there.
Hi @otto42 cleaned htaccess file first thing i did. cleared browser caches and used VPN on Opera private, second thing i did, still the same. Already been through deactivation of plugins on a staging site i set up but still not working. I did everything i could hence thats why im on here. Usually can figure out though my processes to get a resolution but this is eluding me completely.
I understand. The thing about JS errors like this, especially after an update, is that they are always a mismatch of some kind. Your browser still is using the old JS code from the previous version, while the HTML and other code invoking it is expecting your browser to have the new updated stuff.
Tracking down why this is the case can be a pain. Usually it is a server side cache that didn’t get cleared. Or CloudFlare being overly aggressive. Or a plugin which incorrectly eliminates version parameters so that the cachebusting doesn’t work. It’s incredibly hard to say what the cause is, because so many things can essentially cause the same problem.
The problem is simply that your browser is running the old JS code. Figuring out why it is doing that is frustrating, obviously. Once quick thing I always try first is to put the browser in Inspector mode, then right click the refresh button and select “Empty Cache and Hard Reload”. If it’s the browser being weird in any way, this fixes it. If it some really terrible header rules somewhere being very aggressive with cache timers, this also fixes it. If that doesn’t fix it, then it’s the server sending old data, which means server side caching or proxy-caching.
Best of luck, and let us know what you find.
thanks @otto42, though its frustrating when a quick search through the forums reveals im clearly not the only one with the same issue after the 5.4 update
The same result, not necessarily the same issue. Different issues can cause the same end result, and this is often the case after an upgrade. Your browser isn’t getting the right JS files, thus, this is the error from that. But the cause for that can be wildly different between different installations.
When you se this error Shift + F5 works for me.