WordPress.org

Forums

[resolved] Upgraded to 2.6 > error in widgets.php on line 686 (26 posts)

  1. bannerninja
    Member
    Posted 6 years ago #

    So I upgraded to version 2.6 and having caught the secret key thingy, I am now faced with the errors:

    Warning: array_keys() [function.array-keys]: The first argument should be an array in D:\hosting\member\blogkenneth\site1\wp-includes\widgets.php on line 686

    Warning: Invalid argument supplied for foreach() in D:\hosting\member\blogkenneth\site1\wp-includes\widgets.php on line 686

    I have no idea what this means, but it has completely broken my website as can be seen here - and ive tried reuploading the file to no avail.

  2. bannerninja
    Member
    Posted 6 years ago #

    rolling back to 2.5.1 - this isnt working at all - don't know what you did for 2.6 but it has completely exploded my website and even with all the files uploaded, I can't get it to work.

  3. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    You have some kind of broken text widget settings. This is a common problem, but not particular to 2.6.

    1. Reupload 2.6 correctly.
    2. Add this to your theme's functions.php file:
    delete_option('widget_text');
    3. Load your webpage a couple of times.
    4. Remove that line from the functions.php file again. You don't want to leave it there.
    5. Go fix up your text widgets, as they'll be deleted by this process.

  4. bannerninja
    Member
    Posted 6 years ago #

    Yeah I now have a whole new set of problems since rolling back to 2.5 have left me unable to get into the wp-admin area *sigh* why is it that things can just never be bloody simple? :/

    Ill try that widget delete idea if i get in touch with my installation again.

  5. bannerninja
    Member
    Posted 6 years ago #

    any particular place I should insert this? I know zip about php and just plopping it in doesnt seem to do anything.
    Im using the Mandigo theme if that's any help

  6. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    You can insert it right after the initial <?php line.

  7. bannerninja
    Member
    Posted 6 years ago #

    Ok - the sad part about this is, that the upgrade to 2.6 just cost me the better part of the extra functionality on my website as I had no idea I needed to take backup of the widgets - and they are just gone now it seems :(

    In addition, it seems that WP 2.6 has broken the Mandigo theme somehow.

    But thanks for the assistance - at least the website is back up.

  8. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    I had no idea I needed to take backup of the widgets

    You didn't, really. However, several people had this same problem with the 2.5 upgrade.

    Apparently, some extremely unusual cases could hork up the text widgets during the upgrade. It works fine for most people, most of the time.

  9. bannerninja
    Member
    Posted 6 years ago #

    Well im one of those cases and I can now spend hours trying to restore it all, on top of my website now looking like crap.

    Probably not your fault, this has just not been a good upgrade experience.

  10. Tristao
    Member
    Posted 6 years ago #

    Hi, I got the same problem. And cant get access to my admin space...
    I get

    Warning: array_keys(): The first argument should be an array in /usr/home/tristanmf/public_html/wp-includes/widgets.php on line 1352
    
    Warning: Invalid argument supplied for foreach() in /usr/home/tristanmf/public_html/wp-includes/widgets.php on line 1352
    
    Warning: Cannot modify header information - headers already sent by (output started at /usr/home/tristanmf/public_html/wp-includes/widgets.php:1352) in /usr/home/tristanmf/public_html/wp-includes/pluggable.php on line 770

    I get the widgets.php problem on my blog to : http://blog.mendes-france.com/

    Anything suggestions ?
    [i'm french sorry for my english]

  11. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    Tristao: You seem to have some sort of problem with the RSS widgets. Never seen that one, but same basic fix idea will work.

    -Add this to your theme's functions.php file:
    delete_option('widget_rss');
    -Load your main webpage a couple of times.
    -Remove that line from the functions.php file again. You don't want to leave it there.
    -Go fix up your RSS widgets, as they'll be deleted by this process.

  12. Tristao
    Member
    Posted 6 years ago #

    Otto> Thanx so much ! It worked, I gained access to my admin and my blog is back. Just a little problem : it changed my character set ("é" become "é", etc.).
    Would anybody know how to put it back to normal ?

  13. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    Look at your wp-config.php file. If you see this line, remove it:

    define('DB_CHARSET', 'utf8');

  14. Tristao
    Member
    Posted 6 years ago #

    Otto> Once again thank you very much for your answers. You have solved all my problems.
    Cheers from Paris.

  15. Anonymous
    Unregistered
    Posted 6 years ago #

    Hi!
    i've a problem with the new 2.6. I can't edit the widgets on the right sidebar. It's seems the doesn't exist. Some plugint problem?

    Thanks

  16. Mattnh
    Member
    Posted 6 years ago #

    Otto42, you rock!
    Been working on this for ages, but I got the blog running thanks to this thread.
    And I can get into the admin and all.
    Great.
    The only thing is that I lost ALL my Categories.
    Any idea why?

  17. Mattnh
    Member
    Posted 6 years ago #

    Fixed.
    I put back a BU of the database and my old WP.
    Then I cleaned the DB with phpMyAdmin.
    Got a back-up of that on my HD.
    Then I downloaded WP 2.5.1.
    I got rid of 'define('DB_CHARSET', 'utf8');' in the wp-config.php file.
    Upgraded WP and it's working.
    Too late now for 2.6, it's 1:30 a.m..
    Thanks, Otto42!

  18. Mattnh
    Member
    Posted 6 years ago #

    Just to keep you all posted:
    Wp 2.6 is in effect.
    (now needs a new theme ;) )

  19. ppriede
    Member
    Posted 6 years ago #

    For the record:
    I use have WP 2.6 with the plugin Fotobook, and suddenly get the exact same error
    (without making any change)

    Solution:
    Disable the widget "Fotobook Photos" (i use random pictures), then save
    You will get the horrible "Cannot send header... already send by widges.php"

    But the change was saved
    Then hit back and reload the page

    You will see the page without errors... and now enalble the widget again

  20. Song0330
    Member
    Posted 6 years ago #

    Just wanted to state that I had the exact same problem just now while upgrading to 2.6.1 and the fix in the third post down did resolve my issue. Thanks!

  21. jvillari
    Member
    Posted 6 years ago #

    worked for me!! thanks!!!!

  22. lorenzen
    Member
    Posted 6 years ago #

    I tryed to update my WordPress today to 2.6.3 (danish)...Unfortunately, because it worked perfectly, until this update....I apparantly have the same problems with the widgets and I tryed the "Widget delete option" as suggested...But that didn't help.

    Perhaps my error is something else?

    It is as follows:

    Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/www/ourplace.dk/wp-includes/widgets.php on line 1349

    Warning: Invalid argument supplied for foreach() in /home/www/ourplace.dk/wp-includes/widgets.php on line 1349

    Can somebody help me in this matter...I am pulling my hair out right now!!!!

    Thanks/Thomas

  23. drivenmg
    Member
    Posted 6 years ago #

    I'm having this problem after moving my blog from one domain to another. The main blog content will show but trying to get to the back-end or anything i get:

    Warning: array_keys() [function.array-keys]: The first argument should be an array in /home1/hiphopre/public_html/drivenmg/wp-includes/widgets.php on line 686

    Warning: Invalid argument supplied for foreach() in /home1/hiphopre/public_html/drivenmg/wp-includes/widgets.php on line 686

    The site is: http://www.drivenmg.com/blog/

    I did everything mentioned...what am I missing?

    Ideas / Suggestions?

  24. schteev
    Member
    Posted 5 years ago #

    Im having a similar problem on this page
    http://www.testyourbroadband.co.uk/

    On the right hand side are an archive / calendar / tag cloud.

    I add a text box at the top which didnt show up.
    After that i couldnt add or delete anything to the right sidebar.

    I tried adding:
    delete_option('widget_calendar');
    delete_option('widget_cloud');
    delete_option('widget_archives');

    but that does nothing.
    Can anyone help?

    thanks

  25. schteev
    Member
    Posted 5 years ago #

    Oh.. I can still edit the left sidebar.

    Just the right one that i cant add or remove anything!

  26. midori
    Member
    Posted 5 years ago #

    Thank you Otto42, the _rss line did it!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.