• We’re seeing this error appear in the Dashboard in most of our custom themes after upgrading to WordPress 3.3.

    Switching to the Twenty 11 theme seems to resolve the issue so this seems to be a backwards-compatibility issue.

    The error message is:

    Fatal error: Call to undefined method Custom_Admin_Bar::add_group() in /wp-includes/admin-bar.php on line 169

    As a result of this, the Dashboard toolbar doesn’t work in either the Dashboard or the front-end.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Add groups is causing a fatal error. Any feedback on this?

    My quick fix was to edit admin-bar.php and strike all references to add_group(), but that has significantly broken the admin bar. At least it’s there, and now not blocking other functions.

    WP, any feedback on this issue?

    Moderator Sergey Biryukov

    (@sergeybiryukov)

    WordPress Dev

    This error means some plugin or your theme is replacing the standard Admin_Bar class with some Custom_Admin_Bar one which is missing the add_group() method.

    For example, this code snippet would cause exactly the same error:
    http://pastebin.com/H2PuzzE3

    In WordPress.org directory, I have not found any plugins or themes doing this.

    If disabling plugins didn’t help, I’d suggest searching for wp_admin_bar_class string in your theme files.

    @sergey

    Thanks. Your info gave me the hint I needed to fix this issue. My custom theme, in the classes.php file had a version of the Custom_Admin_Bar. I commented it out and removed the comments blocking the add_group in the includes/admin-bar.php file.

    Problem solved. Thanks again for the hint! Saved my bacon!

    Thanks! This did the trick for me, too. I commented out the Custom_Admin_Bar class in classes.php. I also noticed a deprecation warning for automatic_feed_links( false ) which I changed to add_theme_support( ‘automatic-feed-links’ ). Now error logs and UI are clean.

    Can you guys please explain in further detail on how to fix this? I’m a noob to editing wp themes!

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Call to undefined method Custom_Admin_Bar::add_group()’ is closed to new replies.