This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Tagged: Element_id and type do not match
|September 3, 2019 at 1:46 pm #4504981|
I am trying to: migrate from Qtranslate to WPML with the latest version of the Import Plugin
Link to a page where the issue can be seen: staging.hitn.org
I deactivated the Qtranslate plugin, then activated the imported and WPML.
Started the Importer but it stalls in WORKING and then I get a Recovery Email from wordres that my site is in RECOVERY MODE. with the following error in my WPML PLUGIN without being able to resume or reactivate
WPML Multilingual CMS
Version 220.127.116.11 | By OnTheGoSystems | Visit plugin site
An error of type E_ERROR was caused in line 32 of the file /dom31542/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php. Error message: Uncaught InvalidArgumentException: element_id and type do not match for element_id:2596 the database contains post_attachment while this function was called with post_nav_menu_item in /dom31542/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php:32 Stack trace: #0 /dom31542/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(1489): WPML_Set_Language->set('2596', 'post_nav_menu_i...', NULL, 'en', NULL, true) #1 /dom31542/wp-content/plugins/sitepress-multilingual-cms/inc/wp-nav-menus/class-wpml-nav-menu.php(211): SitePress->set_element_language_details('2596', 'post_nav_menu_i...', NULL, 'en') #2 /dom31542/wp-content/plugins/sitepress-multilingual-cms/inc/wp-nav-menus/class-wpml-nav-menu.php(78): WPML_Nav_Menu->_set_menus_language() #3 /wordpress-5.2.2/wp-includes/class-wp-hook.php(286): WPML_Nav_Menu->init('') #4 /wordpress-5.2.2/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #5 /wordpress-5.2.2/wp-includes/plugin.php(46
|September 3, 2019 at 4:05 pm #4506153|
Languages: English (English ) Spanish (Español ) German (Deutsch )
Timezone: America/Lima (GMT-05:00)
Thank you for contacting the WPML Support Forum.
This is not a very commun error but it seems to be related to a database issue after migrating post types from one site to another. Most likely it is realted to a translated element.
You can try the "Clean up" troubleshooting options in WPML -> Support -> troubleshooting and see if they fix the issue (please do a backup before).
If this will not solve the issue, you'll need to operate on your database:
This should fix the issue.