Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Sidebar Widgets conflicting with About Me and Social Widgets in Ocean Extra Plugin #5

Closed
omelsoft opened this issue May 15, 2020 · 0 comments

Comments

@omelsoft
Copy link
Contributor

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 widget options. It just keeps loading as you can see in the image below.

image

When checking the dev console, there's an Uncaught TypeError: settings.data.search is not a function. See following image:

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.

image

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(); } }

That fixed the issue though. But I have to do that over and over again every time there's an update from ocean wp theme core files/plugins.

omelsoft added a commit to omelsoft/ocean-extra that referenced this issue May 15, 2020
@eramits eramits closed this as completed May 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants