It sounds like one of the plugin scripts is either missing or not being loaded for some reason. Please verify that this file exists and isn’t empty:
/wp-content/plugins/admin-menu-editor/js/lodash.min.js
If the file isn’t there, I would recommend reinstalling the plugin. Alternatively, you could manually download the plugin, extract the specific file from the ZIP archive, and upload it to the above location.
If the file looks fine, maybe it doesn’t get loaded. Please take a look at the source code of the plugin settings page and search it for mentions of lodash.min.js. Are there any results? Perhaps the file is there but it’s being loaded from another plugin’s directory?
Finally, there is a specific line of code that needs to be run just after loading the aforementioned JS file. See if there is code like this in the page source code (it should be just below the line that loads lodash.min.js):
<script type="text/javascript">wsAmeLodash = _.noConflict();</script>
If the page loads lodash.min.js but does not include the above code, that could be a sign that there’s some previously unknown bug or plugin/theme conflict.
Hi Janis
Thanks for the prompt reply – once I’ve had the chance to try the steps above I’ll let you know which, if any, worked.
Thanks
Mike
If the page loads lodash.min.js but does not include the above code, that could be a sign that there’s some previously unknown bug or plugin/theme conflict.
I think this might be the issue. The JS is being loaded in but I can’t spot the code above.
It looks like our host is automatically minifying the JS into a single bundle, so I can’t actually see the line where the file gets loaded in, instead I can find it in the Network Resource tab of Dev Tools within a file called build.min.js
I imagine this is what’s causing the issues and that a workaround might be difficult.
Can I add that line in manually perhaps?
Adding the line manually could work. It’s not a sure thing because that code needs to run before any other scripts that use the _ variable. If you have a bunch of scripts bundled into one, running the code after the whole bundle has already been loaded might be too late. Still, it’s worth a try.
Yea…it didn’t work as you’ve predicted 🙂
I’ve been working with support at our host and they’ve talked me through how to exclude certain scripts from concatenating, which was the issue, so all resolved now.
Thanks for the support.