• Hi,

    I have been working on a site today that is now giving me this error:

    PHP Warning: implode() [function.implode]: Invalid arguments passed in C:\inetpub\wwwroot\sitename.com\wp-admin\includes\nav-menu.php on line 267

    I think this error started happening when I cleared out some unused entries from the DB, I’m guessing one of the lines I removed was used in the menu section.

    I have tried Google but have been unable to find any pointers how I can go around fixing this?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    I cleared out some unused entries from the DB

    Manually or with a plugin?

    Do you (or your host) have a backup of the database?
    Can you login?

    Thread Starter mrcreeky

    (@mrcreeky)

    I was doing it manually using phpMyAdmin

    I don’t have a backup from today after I loaded a load of stuff on….

    I’m able to login either to the server (my own) or to WP itself.

    Moderator keesiemeijer

    (@keesiemeijer)

    First create a backup of the database as it is now:
    http://codex.wordpress.org/Backing_Up_Your_Database

    This could also be from something else not working properly.

    Try:
    – deactivating all plugins to see if this resolves the problem? If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    – switching to the default theme to rule out any theme-specific problems.

    Thread Starter mrcreeky

    (@mrcreeky)

    I have tried all of the above but I’m still unable to get it working.

    I’m sure it’s just a missing entry in the DB, but what one, that’s the question 🙂

    Moderator keesiemeijer

    (@keesiemeijer)

    I don’t have a backup from today after I loaded a load of stuff on….

    But do you have a backup from before you worked on the database?

    From looking at the error it’s this line from the function start_el() that is causing trouble:

    $output .= '<input type="hidden" class="menu-item-classes" name="menu-item[' . $possible_object_id . '][menu-item-classes]" value="'. esc_attr( implode( ' ', $item->classes ) ) .'" />';

    I will look in my database if I can find anything related to this. But I think it’s best you restore to an earlier backup (if you have one).

    Thread Starter mrcreeky

    (@mrcreeky)

    I have gone back and restored the items I removed from the wp_terms table but this has not worked either so I’m left guessing it’s referencing a different table also from that function.

    I think my next option is to start a new DB :'(

    Moderator keesiemeijer

    (@keesiemeijer)

    I have gone back and restored the items I removed from the wp_terms table

    How have you done this? From a backup?
    Are you sure you didn’t do anything else, like updating plugins, or WordPress before the error occurred?

    I think my next option is to start a new DB :'(

    This could be an option (but don’t do it right now). As you can still login I would first export your site at wp-admin > Tools > Export.
    You can later import your site if needed:
    http://codex.wordpress.org/Importing_Content

    Moderator keesiemeijer

    (@keesiemeijer)

    Also check if WP_DEBUG is set to true in your wp-config.php:
    http://codex.wordpress.org/WP_DEBUG

    If so, set it to false and check if the warning goes away.

    Warnings are not that serious. If the rest of your website is working I wouldn’t take any drastic actions.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Menus = PHP Warning: implode()’ is closed to new replies.