I am not able

I am not able to create save anything on the menu, I was able to create the menu but cant add pages, existing menu is there but cant order or edit or save that menu.

There are a lot of such errors in debug.log

[03-Nov-2017 14:10:00 UTC] WordPress database error Duplicate entry ‘0’ for key ‘PRIMARY’ for query INSERT INTO wp_postmeta (post_id, meta_key, meta_value) VALUES (6720, ‘_menu_item_menu_item_parent’, ‘0’:wink: made by wp_nav_menu_update_menu_items, wp_update_nav_menu_item, update_post_meta, update_metadata, add_metadata

  • Nastia
    • Support Rock Star

    Hello Andreas

    Hope you are doing well!

    Please make a full backup of your database and then try to repair it. Access your phpMyAdmin go to SQL tab and add the following query:

    SELECT CONCAT('repair table ', table_name, ';')
    FROM information_schema.tables
    WHERE table_schema='YourDatabaseName';

    Replace the YourDatabaseName with your actual database name.

    If this will not work, please check that a PRIMARY KEY set on your table is set to AUTO-INCREMENT. Add this query to SQL tab

    ALTER TABLE wp_postmeta
    MODIFY post_id INT NOT NULL AUTO_INCREMENT;

    If you have a previous backup where this issue is not showing, please remove wp_postmeta and wp_post tables and import same tables back to the database, from the backup.

    Hope this will help!

    Cheers,

    Nastia

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.