WordPress.org

Forums

changing prefix 'wp' causes Warning: array_key_exists().. (12 posts)

  1. Tara
    Volunteer Moderator
    Posted 5 years ago #

    hi,

    I manually changed the default prefix 'wp'.

    I have no problem loging into my admin.

    But i get this the following error on top of the sidebar (default theme). There are no plugins.:

    Warning: array_key_exists(): The second argument should be either an array or an object in /home/virtual/XXXXXX../wp-includes/widgets.php on line 852

    what might be the problem. please help. Thanks. tara

  2. raymondl
    Member
    Posted 5 years ago #

    Same here. I have been having a lot of problems with hackers inserting hidden links (display:none) into my posts so I've decided to rename the tables. After doing that I got the same error message.

    Now looking at my sidebar configuration I find they are all empty. I can create new widgets and that fixes the error message but the old widget set up is gone.

    I'm going to see if I can find this information in my backup and restore the necessary entries.

  3. raymondl
    Member
    Posted 5 years ago #

    Ok I fixed this from the backup... I looked in the backup and found the line beginning:
    INSERT INTOwp_optionsVALUES (78, 0, 'sidebars_widgets',

    Then I went to the active table and deleted this line and inserted the line from the backup. Now I have all my previous widgets back.

  4. MarsHottentot
    Member
    Posted 5 years ago #

    But where? I have the same error and I looked for this INSERT INTOwp_optionsVALUES (78, 0, 'sidebars_widgets', in my Theme editor (Son of Blue) and found nothing like that command.

  5. Samuel B
    moderator
    Posted 5 years ago #

    raymondl is speaking of his .sql database back up

  6. MarsHottentot
    Member
    Posted 5 years ago #

    Sure, but where in the back up was this added? I just searched through my files by FTP and this line didn't appear anywhere, so it likely has nothing to do with my theme (neither sidebar carries this particular line of code - should it?).

    Forgive me if my comments are gobbledygook - I'm lost in the wilderness here!

  7. Samuel B
    moderator
    Posted 5 years ago #

    again - he didn't find it in a theme file
    you won't find it via ftp
    login to host's phpmyadmin
    and "export" your database
    you will get a .sql file
    open that file in a plain text editor like notepad
    search

  8. MarsHottentot
    Member
    Posted 5 years ago #

    Thank you Samboll. Spelling it out is drag (to put it mildly), I know, but I am writer - I didn't anything about code until I started using WP - I really needed someone to do that for me. Much appreciated. I think you just solved my problem.

  9. Samuel B
    moderator
    Posted 5 years ago #

    sorry if I seemed impatient. oft times I answer questions at work and am terse - not bothered, though. glad you got it.

  10. Void lon iXaarii
    Member
    Posted 5 years ago #

    for me too it fixed it by just re-putting a widget in the sidebar

  11. jasadim
    Member
    Posted 5 years ago #

    omg !!!! thanks fos this usefull tip, iXaarii it works for me to :P

  12. SpankMarvin
    Member
    Posted 4 years ago #

    Thank you all for this discussion. I was pulling my hair out trying to figure out what was going on. I too had used an SQL import. Doing what iXaarii suggests worked like a charm. Thank you, thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.