• Resolved casedimage

    (@casedimage)


    Hi, hope this is not a duplicate thread but I’m not having exactly the problem that most are having with upgrades.
    After upgrading to 3.3, I can see and use my admin/dashboard page fine but when I go to the site after logging in to the admin page, don’t have the admin toolbar like I used too. Instead I get this ;
    Warning: Invalid argument supplied for foreach() in /[abridged address]/wp-includes/class-wp-admin-bar.php on line 342

    Any thoughts?

    thanks

Viewing 7 replies - 16 through 22 (of 22 total)
  • Your theme can call mytheme_footer, which is not the same as the default and generally required wp_footer. Each just add items just above the closing body tag.

    Hi everybody;
    Do this works to solve this problem:

    put this footer code:
    <?php wp_footer(); ?>

    before:

    </body>
    </html>

    & put this code:
    <?php wp_head(); ?>

    before
    </head>

    best wishes,
    Mr.vAhiD.DI

    I have the same error message than @dialogcrm and when I switch theme it works perfectly.
    None of the solutions above works so I would like to know if someone knows the thing to fix in the theme ?
    in functions.php?

    thank you.

    I wouldn’t consider this resolved. Many people seem to be having this issue. I run a dozen wordpress sites and this is happening on nearly all of them.

    My temporary fix has been to strike/comment out the lines referring to the add_group() function. While this brings in the bar and stops the error from blocking other functions, the admin bar is now messed up and non-functional.

    Help. Please.

    Moderator Sergey Biryukov

    (@sergeybiryukov)

    WordPress Dev

    Fatal error: Call to undefined method Custom_Admin_Bar::add_group() [name of site here] wp-includes/admin-bar.php on line 169

    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:
    https://pastebin.com/H2PuzzE3

    In www.remarpro.com 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

    Thank you very much. Your comment gave me the hint I needed.

    I found the Custom_Admin_Bar class in my theme’s classes.php file and commented it out. Then I removed the comments I had put on the includes/admin-bar.php, returning the add_group function. Works perfectly now.

    Thanks for the hint, it gave me just the right information I needed to find the solution!

    @sergey @gosbdc : you are my heroes !!! it works!!!! I knew it was my theme but didn’t know where to fix it.
    I just deleted the custom_admin_bar php code from classes.php and it works. I think I could completlty delete this file but it’s called from functions.

    So Happy Christmas Guys and a Big Thank You !!

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘No admin toolbar on website page after upgrade to 3.3.’ is closed to new replies.