'Fatal error: Uncaught exception 'Exception' with message 'Illegal widget setting ID
i recently noticed that when try to load Appearance > Customize i get this error:
Notice: Trying to get property of non-object in /home/kavwxoln/feelfreehypnosis.com/wp-includes/class-wp-customize-nav-menus.php on line 682
Fatal error: Uncaught exception 'Exception' with message 'Illegal widget
setting ID: nav_menu_item[]' in /home/kavwxoln/feelfreehypnosis.com/wp-
includes/customize/class-wp-customize-nav-menu-item-setting.php:171 Stack trace: #0 /home/kavwxoln/feelfreehypnosis.com/wp-includes/class-wp-customize-nav-menus.php(693): WP_Customize_Nav_Menu_Item_Setting->__construct(Object(WP_Customize_Manager), 'nav_menu_item[]', Array) #1 [internal function]: WP_Customize_Nav_Menus->customize_register(Object(WP_Customize_Manager)) #2 /home/kavwxoln/feelfreehypnosis.com/wp-includes/class-wp-hook.php(286): call_user_func_array(Array, Array) #3 /home/kavwxoln/feelfreehypnosis.com/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #4 /home/kavwxoln/feelfreehypnosis.com/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #5 /home/kavwxoln/feelfreehypnosis.com/wp-includes/class-wp-customize-manager.php(926): do_action('customize_regis...', Object(WP_Customize_Manager)) #6 [internal function]: WP_Customize_Manager->wp_loaded('' in /home/kavwxoln/feelfreehypnosis.com/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php on line 171
I searched on Google and found this thread but when apply the answer provided there :
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 get this answer from phpmyadmin:
#1068 - Multiple primary key defined
So im seaching for asnwer how to fix this issue.
Solution 1:[1]
This is what i do:
- Go to database via Phpmyadmin, then make backup from wp_terms table ONLY !
Go to SQL editor and paste this code:
CREATE TABLE
wp_terms
(term_id
bigint(20) unsigned NOT NULL AUTO_INCREMENT,name
varchar(200) NOT NULL DEFAULT '',slug
varchar(200) NOT NULL DEFAULT '',term_group
bigint(10) NOT NULL DEFAULT '0', PRIMARY KEY (term_id
), UNIQUE KEYslug
(slug
), KEYname
(name
) ) ENGINE=MyISAM AUTO_INCREMENT=603 DEFAULT CHARSET=utf8;Open previous saved backup from .sql file, and insert it via SQL editor using phpmyadmin.
Problem solved !
NOTE: Get only lines from backup, not entire database !
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | DrMTR |