[Resolved] Widgets Disappearing

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 7 replies, has 5 voices.

Last updated by shreyasK 5 years, 8 months ago.

Assigned support staff: Caridad.

Author
Posts
#219952

Hi,

I'm on a WAMP so I can't share, but I just installed Bootstrap 1.2 and all the widgets in my custom widget area disappear. If I then attempt to replace them, they again disappear the moment I refresh the Admin page.

I created this custom widget area in a child theme using this code:

function custom_widget_areas_init() {

register_sidebar( array(
'name' => 'Front Page Widget Area',
'id' => 'frontpage-widgets',
'before_widget' => '<div>',
'after_widget' => '</div>',
'before_title' => '<h2 class="rounded">',
'after_title' => '</h2>',
) );
}
add_action( 'widgets_init', 'custom_widget_areas_init' );

This was working using the exact same setup/code using Toolset Bootstrap 1.1.

If I change my child theme's parent to Twenty Fourteen instead, the same setup/code works again, but the moment I switch back to Toolset Bootstrap 1.2, the problem comes back. Note, I do not use any plugins other than TVC plugins, I have tried every variation of name (no big caps, no spaces, etc.), but can't find a fix.

Wayne

#219979

Dear Wayne,

This looks like a bug in a function from the toolset bootstrap theme. I will be reporting this to the developers.

But meanwhile, you may want to try editing functions.php and add a comment to the following line:

// add_filter('sidebars_widgets','wpbootstrap_checksidebars_widgets' );

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

Regards,
Caridad

#220122

Hi Caridad,

Thanks for your speedy and helpful response. The function associated with this filter appears to contain a lot of checking and setup re: widgets. Is there anything I should expect to malfunction given the removal of this filter?

Thanks,

Wayne

#220174

Dear Wayne,

I have asked the developers and I will post their answer shortly.

Regards
Caridad

#220708

Dear Wayne,

The only purpose is to reset the default sidebars, you wont loose any functionality. Another way of overriding this, without having to edit the parent theme is this:

//Override check sidebar widgets filter in child theme
function wpbootstrap_checksidebars_widgets($sidebars_widgets) {
return $sidebars_widgets;
}
add_filter('sidebars_widgets','wpbootstrap_checksidebars_widgets' );
//Now user can add custom widget areas
function custom_widget_areas_init() {
    register_sidebar( array(
    'name' => 'Front Page Widget Area',
    'id' => 'frontpage-widgets',
    'before_widget' => '<div>',
    'after_widget' => '</div>',
    'before_title' => '<h2 class="rounded">',
    'after_title' => '</h2>',
    ) );
}
add_action( 'widgets_init', 'custom_widget_areas_init' );

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

Regards,
Caridad

#224704

Thanks, had this problem to!

#325389

May I ask why this hasn't been addressed in 14 months since it was reported? I just wasted an hour trying to get to the bottom of this and only did because (I assume Wayne or Willem) posted this on wordpress.stackexchange.com.

#328325

This is a serious issue and should have been fixed. Being new to WP, I spent more than 5 hours trying to debug the issue before find the link to this post on StackOverflow.