Making a WordPress website (version 4.2.2) for a client we had a ferocious load of plugins on board. Any WordPress web designer knows that this can be a recipe for trouble, and so it proved for us. Sometimes plugins are not compatible with each other and stuff stops working. For us it was two things in the admin screen: the drop-down menu to edit widgets was no longer working; and the menu editing screen no longer allowed drag and drop.
Standard advice for this scenario is to disable and uninstall plugins one by one. We could do that, but every one of these plugins was needed for this site, and some of them had a lot of work and data associated with them. So that was not the favoured option. Luckily a bit of research found a better solution.
Uncaught TypeError: Cannot read property 'add' of undefined(anonymous function) @ load-scripts.php?c=0&load=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-core,jquery
:54a.widget.version @ load-scripts.php?c=0&load=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-core,jquery
:54(anonymous function) @ load-scripts.php?c=0&load=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-core,jquery
Edit WordPress widgets without using the dropdown admin interface:
Use this custom URL to turn on a hidden widget editing mode that allows you to edit widgets one by one and save them.
This then persists until such time as you turn it off. Once widgets are edited, turn off editing mode like this:
Replace ‘yoursite.com’ with your site’s address – or just go to the widget editing page and edit the URL directly in your address bar.
What to do when you can’t drag and drop the WordPress menu admin interface
The other problem we had was the menu editing interface. This normally allows you to drag and drop. Ours didn’t. There isn’t a cunning hidden menu editing trick like we used for the widgets, so a bit more debugging was required.
This extra line goes into the wp-config.php file :
define( 'CONCATENATE_SCRIPTS', false );
Edit your wp-config.php file and insert the extra code just below this line:
Checking the remote site and indeed, http://yoursite.com/wp-includes/js/jquery/ui/core.min.js was not there. Some of our messing about with plugins must have accidentally deleted it. But good news: this is a core file, so we had a local copy. Uploading the new copy fixed the menu problem entirely – and when we checked, it also fixed the widget editing problem we had earlier! So we could turn off the widget editing alternative method, and also successfully turn off CONCATENATE_SCRIPTS.
Two problems fixed in one, a useful workaround and a diagnostic trick discovered.