Do all of the entries have the same “site_id”? Is “meta_value” large, or empty/very short?
Assuming that “site_id” is the same, this sounds like either a caching problem or database corruption. Normally, WordPress Options API guarantees that there will be only one wp_sitemeta
entry for any given site_id
/meta_key
combination. When a plugin tries to set a site option, WordPress first checks if that option already exists in wp_sitemeta
. If it doesn’t, WP adds a new row to the table. Otherwise it just updates the existing entry.
A buggy caching layer could incorrectly report options as missing, which would cause WordPress to add multiple copies of the same option. Similarly, some types of database errors could cause the “does this option exist?” check to fail, which would also lead to duplicate entries.
Try temporarily turning off any database caching solutions you might be using, and check/repair the sitemeta table.
Thread Starter
Sameer
(@msameerbutt)
Yes it, same site_id and following is the meta value
a:16:{s:22:”hide_advanced_settings”;b:1;s:16:”show_extra_icons”;b:0;s:11:”custom_menu”;N;s:18:”first_install_time”;i:1418230439;s:21:”display_survey_notice”;b:1;s:17:”plugin_db_version”;i:140;s:24:”security_logging_enabled”;b:0;s:17:”menu_config_scope”;s:6:”global”;s:13:”plugin_access”;s:11:”super_admin”;s:15:”allowed_user_id”;N;s:28:”plugins_page_allowed_user_id”;N;s:27:”show_deprecated_hide_button”;N;s:37:”dashboard_hiding_confirmation_enabled”;b:1;s:21:”submenu_icons_enabled”;s:9:”if_custom”;s:16:”ui_colour_scheme”;s:7:”classic”;s:23:”show_plugin_menu_notice”;b:0;}
right now, we are stuck, did not able to figure out what causing this problem.
We have using latest wordpress version with WP Supercache
The meta_value
looks reasonable.
I don’t think WP Supercache would cause this kind of a problem. I’ve used it together with Admin Menu Editor before and I didn’t notice any issues.
Have you tried running CHECK TABLE wp_sitemeta
or whatever the equivalent query is for your database? How about deleting all the superfluous entries? You can safely delete any rows where meta_value
contains "custom_menu";N;
Thread Starter
Sameer
(@msameerbutt)
We have deleted the extra records although we are unable to track the real culprit. We will keep an eye open and if there is any track of the problem found we will love to share here.
Thanks