Ready to get started?Download WordPress


Sidebar Widgets causing fatal error (8 posts)

  1. benkessler
    Posted 5 years ago #

    After upgrading to 2.7.1 I noticed my sidebar widgets were no longer appearing. When viewing the Widgets page under the Appearance tab in admin, the default widgets are no longer shown, all I see is the widget for the YARPP plugin.

    I then notcied that the Sidebar Widgets plugin included with WordPress was deactivated. However, when trying to activate it I receive the following message:

    Plugin could not be activated because it triggered a fatal error.

    Fatal error: Cannot redeclare register_sidebars() (previously declared in /home/content/b/e/n/benkessler/html/wp-includes/widgets.php:69) in /home/content/b/e/n/benkessler/html/wp-content/plugins/widgets/widgets.php on line 42

    Any ideas? I'm stumped.

  2. sjthomas
    Posted 4 years ago #

    What version did you upgrade from? WordPress brought widget management into the ore a couple of versions ago, the problem you're seeing is because the default WordPress widget definition is conflicting with the plugin you're trying to activate because they do the same thing (and specifically, use the same declarations).

    You may want to start here http://codex.wordpress.org/Plugins/WordPress_Widgets_Api

    I don't have any experience with the pre 2.2 widget plugin, but I'd say the best bet is to uninstall it and move your widgets over to the default WordPress implementation. But YMMV. Hope that helps.

  3. benkessler
    Posted 4 years ago #

    I upgraded from 2.7. So you're saying in 2.7 the widgets are predefined somewhere else, not the Sidebar Widget plugin?

  4. sjthomas
    Posted 4 years ago #

    Yep. The widgets functionality is now part of the core WordPress installation, not a plugin. Although it's been like that for several versions (since version 2.2 in fact), which makes it odd that you've just come across this version (I would have expected it in 2.7). WordPress call the old widget plugin (the one you're trying to activate) deprecated, meaning it's no longer supported and has been replaced (and is also likely to stop working in a future version).

    In 2.7 you set up your widgets on the Appearance > Widgets page, but it only works if the theme you're using is set up to utilise widgets. Have you changed themes recently? I've heard of a problem where certain widgets get locked to certain themes.

  5. benkessler
    Posted 4 years ago #

    Didn't change themes or anything. Just overwrote my sidebar.php and functions.php in my theme but didn't fix it. Where are the widgets defined in WordPress itself?

  6. stevejohnson
    Posted 4 years ago #

    Core widgets are in wp-includes/widgets.php, along with the core widget code.

    You may need to clear the sidebars_widgets entry in wp_options if your widgets are stuck in limbo.

  7. benkessler
    Posted 4 years ago #

    Replaced widgets.php and still no luck. Can anyone help? My sidebar is completely destroyed.


  8. valentina martino
    Posted 4 years ago #

    I'm having a similiar problem, but my widgets seem to be locked up on the sidebar and i cannot remove them...
    any suggestions?

Topic Closed

This topic has been closed to new replies.

About this Topic