Support » Fixing WordPress » widget.php problems

  • 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.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Are you using any Widgets?

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

    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…

    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….

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Stick this in your theme’s functions.php file:

    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.

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

    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

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

    How can I fix it?


    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.

    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.
    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.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘widget.php problems’ is closed to new replies.