WordPress.org

Forums

widget.php problems (9 posts)

  1. xxkakuraxx
    Member
    Posted 7 years ago #

    Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/kayloo/public_html/wp-includes/widgets.php on line 654

    Warning: Invalid argument supplied for foreach() in /home/kayloo/public_html/wp-includes/widgets.php on line 654

    This is appearing on every single page of my blog. I've tried looking at the php file, and everything. I even deleted WordPress,re-installed, and added the backup and the messages are still there.

    Please someone help me because I have come to an dead in to what to do.

  2. TrishaM
    Member
    Posted 7 years ago #

    Are you using any Widgets?

    This code is used when registering widgets for use in your sidebar......

  3. xxkakuraxx
    Member
    Posted 7 years ago #

    Yea... well I was using widgets, but now I'm not due to the reinstall, but before all that I couldn't see the widgets on the sidebar in wp-admin...

  4. TrishaM
    Member
    Posted 7 years ago #

    Just for giggles check under Design >Widgets and on the right side see if there are any listed under Current Widgets...... If you don't have any it will say "you are using 0 widgets in the sidebar"......If you have more than one sidebar there is a dropdown for each sidebar......

    It sounds like a conflict with an older widget and the new 2.5's way of handling widgets....

  5. Stick this in your theme's functions.php file:
    delete_option('widget_text');

    Then load the page. This will kill the option for any text widgets you may have had in the sidebar, but it will fix the error. After you can see the blog and login again, remove the above line, you won't be able to fix the widgets until you do.

    Apparently there's some kind of incompatibility between the old text widget data and the new text widget data, but for some reason it doesn't happen to everybody.

  6. xxkakuraxx
    Member
    Posted 7 years ago #

    Ah man Otto your a savior. Thanks, you really helped out. Works fine now.

  7. thiagol
    Member
    Posted 7 years ago #

    Hey guys, I had the same problem but when trying to change the wp_ prefix... I removed all the widgets and the warning desappeared but now all my comments and a lot of things are midle-cutted O.o

    http://up.onhost.com.br/

    U guys can see there, the comments and the blog title... =/

    How can I fix it?

    FIXED! THANKS ANYWAYS

  8. ryureid
    Member
    Posted 6 years ago #

    Otto, you rock. You're mad wisdom solved our problem as well. We tried over a dozen "fixes" people suggested. Now after 24 hours of frustration we are back up. Thanks.

  9. gljackson
    Member
    Posted 6 years ago #

    Otto, I'm hoping you can help me with a related issue. I've looked all over this forum and haven't found a fix that works. I've got two blogs that are almost identical except the first one's sidebar has slipped to the bottom.
    http://insuranceblogtoday.org/
    http://theinsuranceblog.org/
    same settings, mostly same sidebar content, but the posts are different, of course.
    And to make things worse, on the problem blog, it says I have 0 widgets in the sidebar frustrating my attempts to try deleting the offending widgets.

Topic Closed

This topic has been closed to new replies.

About this Topic