• Hi there

    My website is https://www.windisch.co.uk/robots/

    I’m having problems with menus in the control panel. It used to work OK, then after some errors uploading images it stopped, the menu area was still being displayed, but the menu area was blank. When I went to the menu area in the control panel all the menu items were blank – the menu had broken.

    I go to Appearance -> Menus and create a new menu, I select a category or page (both have the same error), click on Add to Menu but instead of the new menu item having the correct name, it says (Pending), and when I click on Save Menu the item disappears.

    Do you have any suggestions as to what could be causing this?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Do have hotlinking protection enabled on your hosting account?

    Thread Starter [email protected]

    (@simonwindischcouk)

    Hi, thanks for that. The answer is no.

    I have five or so other sites on the same host and they still all work fine. Maybe I should backup and reinstall, I’d like to know what the (Pending) means on the menu items though…

    Simon

    Did you succeed in fixing this problem? I have it too. It’s strange that this behaviour appeared all by itself after some weeks during which nobody messed up with site administration.

    Thread Starter [email protected]

    (@simonwindischcouk)

    Hi there, no it’s still broken. I’ve got around it by adding a categories section to the right, but it seems clear to me that the database structure for menu is broken in some way.

    I’ve done some more research, and browsed the database, table wp_posts. I have a good database which has 329 rows, with post_type s attachment, page, post & mostly revision. In the bad database I have 970 rows, also with attachment, post and revision but also 20 or so nav_menu_item with post_status of draft.

    I don’t know if this is relevant though. How does your database look?

    It’s the same. The good copy of the databasa that’ on a local machine has all nav_menu_item with status ‘publish’. The bad copy (that is, the ‘pseudo-production’ copy on the server) had all nav_menu_items with status ‘draft’. I re-saved two of the pages the nav_menu_items referred to, and now I have two new nav_menu_items with status ‘publish’ but the manu are still broken. I need to fix this, becaus I am going real production very soon…

    Browsing the bad database, I’ve seen that table wp_postmeta is broken. phpMyAdmin reports “#126 – Incorrect key file for table ‘./a3953875_wpress/wp_postmeta’; try to repair it “.
    May this be part of the problem?

    Thread Starter [email protected]

    (@simonwindischcouk)

    Yes I get
    Error
    SQL query:

    SHOW INDEX FROM wpress_postmeta ;

    MySQL said:

    #145 – Table ‘./simonwindisc_wp3_9188235/wpress_postmeta’ is marked as crashed and should be repaired

    So I found https://realmike.org/blog/2010/12/21/wordpress-database-errors/

    and ran REPAIR TABLE wpress_postmeta;

    And now it works. What great teamwork! thanks

    That’s it! My table was in worse shape, so I had to REPAIR … USE FRM (see MySQL docs) but in the end it worked. I was put on the right track by a comment in nav-menu.php that said

    /**
     * Save posted nav menu item data.
     *
     * @since 3.0.0
     *
     * @param int $menu_id The menu ID for which to save this item. <strong>$menu_id of 0 makes a draft, orphaned menu item.</strong>
     * @param array $menu_data The unsanitized posted menu item data.
     * @return array The database IDs of the items saved
     */
    function wp_save_nav_menu_items( $menu_id = 0, $menu_data = array() ) {

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Menu broken – new menu items show (Pending)’ is closed to new replies.