I've hit a snag with a Varnish - Nginx - Wordpress set up. The server is running multiple Joomla based sites (all fine) and should be running one Wordpress one too apart from it breaks with Varnish.
Basically when Varnish is enabled I get the following error:
Uncaught ReferenceError: _ is not defined
on the Dashboard and various JQuery not defined errors elsewhere.
With Varnish off it all works perfectly. I'm scratching my head now as to where the issue lies with my Varnish set up. I can't find anything on the web that is a similar issue and any help would be appreciated!
I just stumbled on this issue today. You didn't post your configuration, but my guess is that you might be using querysort
to normalize your query parameters.
I found that querysort
really doesn't like the load-scripts.php
URLs. In a lot of cases, it ends up truncating the URLs. If you're using it, I recommend either not using it or making a special condition for it like:
if (req.url !~ "load-scripts\.php") {
set req.url = std.querysort(req.url);
}
Further to Carl's answer I found that stopping querysort
for the whole wp-admin helped with this error within other plugins.
if (req.url !~ "wp-admin") {
set req.url = std.querysort(req.url);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With