I had the same problem. I did not have pre-existing menus, but newly created ones had the same symptoms as you described.
In my case, the problem was a ill-defined table wp_terms. It was missing the AUTO_INCREMENT flag on the column term_id as well as all indexes and the primary key.
I can only assume that the update process messed up at some point in the past. I run a pretty ancient installation which was originally set up in 2005.
The following change fixed the problem for me:
ALTER TABLE `wp_terms`
CHANGE COLUMN `term_id` `term_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT FIRST,
ADD PRIMARY KEY (`term_id`),
ADD INDEX `name` (`name`),
ADD INDEX `slug` (`slug`);
I would recommend comparing your schema against a current schema though. wp_term_taxonomy might be involved as well (wasn’t in my case).
Related Posts:
- How to return number of found rows from SELECT query
- Check if post of title already exists
- $wpdb->delete column values IN ARRAY()?
- How To Make Connection To WordPress Data Base In A Plugin?
- Changing user_nicename
- Does WordPress cache get_user_meta() results?
- WordPress will not operate correctly
- How to Join two tables from separate databases within WordPress
- error importing localhost export file to server
- Would manually deleting the dumping data fix a “#1062 – Duplicate entry ‘1’ for key ‘PRIMARY'” phpMyAdmin error?
- How to sort results from a custom database table
- How can I call a row of user specific data from a custom table added to the WP Database
- How to merge local and live databases?
- How to track a users progress through pages by inserting data into WordPress Database?
- Import 10,000 Users into WordPress WITH a specific ID for each user
- WP database error for comments_popup_link()
- if statement on database query
- No wp-config.php file on local install of wordpress – site still displays
- How to migrate the posts from an old custom legacy blog to a new WordPress website?
- Different database query in function.php using mysqli
- How to create and work with custom data / tables (i.e., for arbitrary data)?
- Create WP_Query to search for posts by their categories or their parent/child categories
- WordPress not reflecting changed of the database
- How can I save unique user data on my site? [closed]
- Update results, Before deleting the related category [closed]
- database sent to a JSON file
- inserting a post from an extern php file but post content doesn’t show on wp site
- Using custom tables for old posts
- Not connecting to database in file with multiple MySQL connections
- WordPress Block developer from exporting Database via PHP
- wpdb prepare insert table doesn’t work
- Should I use WordPress to skin a database website?
- How do I display offsite database info on my wordpress site?
- Creating Database Table vs. Adding MetaData to Post & User
- WordPress and MySQL: trying to print data using PHP from user_meta custom field data
- Most commented posts by time period (last 12h, last 24h and etc)
- I can’t update my data through $wpdb
- Why when I create a new post I found 2 record related to this post into the posts database table?
- Adding data to custom wordpress database table
- phpMyAdmin error #1062 – Duplicate entry ‘1’ for key ‘PRIMARY’
- Add row to custom database Table and delete all rows older than 1 day
- select a single val though a table in wordpress
- How to create Loop code for Menu using WordPress?
- SQL error with custom query
- What’s wrong in my PHP code? I’m using WordPress Astra Theme and I can’t insert data into my SQL
- Please help! I have a problem with getting wordpress databas
- Error establishing a database connection (Set-up locally)
- PHP Warning: mysqli_query(): after updating my websites php from 5.6 to 7.2
- Using wpdb to connect to a different database is not working
- Insert data from form to database
- can’t delete a row from post_meta table
- How to set max users to 17.000
- two wordpress sites, two themes, one database, same content
- Insert double entry in DB
- How to connect database table to each registered wordpress user.
- Let users register weight each day and save it in DB
- MySQL database migration to WordPress
- Custom query_posts() parameter
- How to pass username into form that sends data to database
- How to edit the default database of WordPress [closed]
- Display total count of products in orders of a specific order status
- Execute multiple PHP Snippets causes error?
- Custom form that stores data in mysql database
- Putting form result in my database
- Can’t insert into a database wordpress
- Updates applied to staging WordPress site affecting production even with different databases
- Accessing data from a non-WP database/table within a page content
- What is a valid parent for get_terms()?
- Getting id of poll from WP database
- Storing Array from returned database query and using the array in a new query
- How to insert a single row to WP database table?
- Change list item content in menu navigation to add a child element with specific class
- Get updated query results on page after insert in database
- WSoD being caused by this piece of code
- I want to select the from values from database in WordPress? [closed]
- Menu Limitations
- How can I Add a variable PHP in the Menu Nav
- mysql query from wordpress page using custom table
- Where to place PHP code that inserts (or doesn’t insert) menu item?
- User management system similar to wordpress one?
- Importing Geo data into wordpress database
- How can I fix WordPress installation errors?
- PHP Fatal error: Uncaught mysqli_sql_exception: Table doesn’t exist in wordpress/wp-includes/wp-db.php
- $wpdb->update with multiple parameters gives error
- How to save checkbox values for logged in users?
- Adding an Avatar to the Top Nav Bar
- SQL Injection blocked by firewall
- wp search-replace on database returns PHP fatal error: Array and string offset access syntax with curly braces is no longer supported
- Automatically adding new post categories to menu
- Add data attribute to each li in menu
- How to check if a meta value has already been assigned to any user?
- How to display data from custom table in wordpress phpmyadmin
- Calculating a large number of MYSQL queries as customshort codes, slow
- How does WordPress know wich language is chosen when there is a database connection error
- WP_Query adds “(wp_posts.ID = ‘0’)” so no results are returned
- Remove metabox from WordPress menu editor page?
- Custom Walker_Nav_Menu issue with variables on PHP 7.3
- How to add an arrow to menu items has submenus
- Is it possible to create a wordpress database with php code?
- wp_nav_menu returns menu list in ascending order. How can I arrange the menu same as dashboard menu