Support » Fixing WordPress » Call to undefined function wp_register_sidebar_widget (WP 2.5)

  • I have just upgraded my wordpress blog 2.3.2 to the 2.5, and when I go to the admin dashboard (after upgrading the database [wp-admin/upgrade.php], of course) I get this error:

    Fatal error: Call to undefined function wp_register_sidebar_widget() in xxxxxxxxx/blog/wp-admin/includes/dashboard.php on line 31

    -I did deactivate the plugins
    -I did make a backup of my database
    -I did delete all the 2.3.2 files in my server (except for wp-config.php, an .htaccess and the wp-content)
    My blog front is working fine !

    I uploadead the 2.5 files twice, to see if there was a file missing.

Viewing 15 replies - 1 through 15 (of 30 total)
  • Are you using the K2 theme? Because that happened to me and I was using one of the variations of K2.

    Yes, I’m using the K2 RC3.

    What did you do to resolve this ? I only renamed the K2 folder to K2. and it works fine now.

    Thank you for your help !

    Is there a fix for this yet? I rely on K2 for my theme and don’t really have an alternative.

    haxorjoe, I donĀ“t thing there is a fix yet. I would have to be made by the K2 developers. But as I already said, I only renamed the /k2/ to /k2./ and it worked.

    same problem. i renamed k2 to k2. and went to the home page and it was blank. what is the proper way to rename?

    I downloaded K2 RC4, copied the new files over the old RC3 ones, and it appears to have fixed the error for me.

    Never mind, works now.

    I downloaded K2 RC4, copied the new files over the old RC3 ones, and it appears to have fixed the error for me.

    Yes !!!, that works too.

    Downloading and installing RC4 did not work for me. I then got this error:
    Call to undefined function: wp_bootstrap()

    So searching led me to believe I should blow away my entire K2 directory and start fresh, which I did. But still had issues. Turns out, I believe it had to do with the ‘active plugins’ setting in the database.

    I removed the entry “../themes/k2/app/includes/widgets-removal.php” from the active_plugins row in the database “options” table. Geez!

    dhergert – thank you so much. that worked a treat!

    ah… upgrading, how I love it.

    To fix the error:
    navigate to your K2 folder -> app -> includes
    edit the file widgets-removal.php as below

    Change the contents of the file from:

    < ?php
    if (get_option('k2sidebarmanager') == '1') {
    remove_action('plugins_loaded', 'wp_maybe_load_widgets', 0);


    < ?php
    if (get_option('k2sidebarmanager') == '1') {
    remove_action('plugins_loaded', 'wp_maybe_load_widgets', 0);
    if( is_admin() )
    {global $pagenow; if( $pagenow == 'index.php' ) wp_maybe_load_widgets();

    Many thanks to Tom Raferty!

    I don’t use K2 as a theme and still got that error. Now I can’t get access to my dashboard… Help!

    @journeyguy: what theme are you using then? Does it have a sidebar manager of it’s own, or something like that?

    And are you able to access the other admin pages? (as in:

    Tibor, thanks tons for that post. It worked like a dream. I was already using k2 rc4 so I was kind of at a loss. i had disabled all plugins and reverted my blog to default theme before going from 2.3.3 to 2.5, and like the original poster my frontend of the site was working fine but I was getting the fatal error when trying to get in through wp-admin.

    Incidentally, i think I’m done with K2. It just isn’t providing me with enough positives to justify the problems I keep having while trying to also keep my site up with the WP upgrades. :-/

    @dmchale I guess we should thank Tom Raftery (with my excuse for misspeling his name earlier).

Viewing 15 replies - 1 through 15 (of 30 total)
  • The topic ‘Call to undefined function wp_register_sidebar_widget (WP 2.5)’ is closed to new replies.