I was working on a project using OceanWP which comes with the ocean-extra plugin. I installed Custom Sidebars plugin by WPMU Dev to add more functionality and flexibility to the sidebars.
After activating the plugin, and making some changes in the sidebar’s widget options. It just keeps loading as you can see in the image below.
When checking the dev console, there’s an Uncaught TypeError: settings.data.search is not a function.
See the following image:
Clicking on the widgets.php file will show the file and the line where the error is coming. And yes, it comes from the about-me.php and social.php in ocean-extra/includes/widgets directory.
I did a temporary fix by updating some lines from:
if ( settings.data.search( 'action=save-widget' ) != -1 && settings.data.search( 'id_base=' + widget_id_base) != -1 ) { oceanwpSortServices(); }
to the following:
if (typeof(settings.data) !== 'undefined' && typeof(settings.data.search) !== 'undefined') { if ( settings.data.search( 'action=save-widget' ) !== 'undefined' && typeof(settings.data.search( 'id_base=' + widget_id_base)) !== 'undefined' ) { oceanwpSortServices(); } }
Though that fixed the custom sidebars plugin conflict with the ocean extra plugin. I still have to do that over and over again every time there’s an update from ocean wp theme core files/plugins.
So, I also created a PR in oceanwp/ocean-extra in Github, and hopefully, an update about the issue with the plugin author’s fix will be published soon.