Skip Navigation

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.

This topic contains 4 replies, has 2 voices.

Last updated by Yvette 4 years, 5 months ago.

Assigned support staff: Yvette.

Author Posts
March 11, 2016 at 11:10 pm #836242

patrizio-romanoD

I was creating amunu in a diferent language, then, white screen of death and this error.
I'm running a multisite and this is happening just in one website (of the multisite)

The website is: loscirocco.it

The error thrown is this one:

Fatal error: Uncaught exception 'InvalidArgumentException' with message 'element_id and type do not match for element_id:4 the database contains tax_ml-slider while this function was called with tax_nav_menu' in /home/artomult/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php:28 Stack trace: #0 /home/artomult/public_html/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(1668): WPML_Set_Language->set('4', 'tax_nav_menu', NULL, 'it', NULL, true) #1 /home/artomult/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/wp-nav-menus/iclNavMenu.class.php(169): SitePress->set_element_language_details('4', 'tax_nav_menu', NULL, 'it') #2 /home/artomult/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/wp-nav-menus/iclNavMenu.class.php(58): iclNavMenu->_set_menus_language() #3 [internal function]: iclNavMenu->init('') #4 /home/artomult/public_html/wp-includes/plugin.php(525): call_user_func_array(Array, Array) #5 /home/artomult/publ in /home/artomult/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php on line 28

I've read a lot of other posts regarding this issue. I just want to know which one is the best way to solve it and how to avoid this happening again in the future (in other sites)

This is really urgent.

Thanks in advance

March 12, 2016 at 9:18 am #836299

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hello.

This is happening due to a mis-match of post types between the "icl_translations" table and either the "wp-posts" or "wp-taxonomy-terms" table. In this case the icl_translations table is expecting a type of "tax-ml_slider" (a taxonomoy" ) but the function is sending a type of "tax_nav_menu" (probably because you attempted to add a taxonomy to your menu.

We can attempt to fix this manually.

Could you please do the following:

(1) Technical Information on you environment
Could you please provide information about your environment by following thsese steps: http://wpml.org/faq/provide-debug-information-faster-support/

(2) Execute the following actions
2.1 Create a backup/restore point of your database
2.2 Manually deactivate the WPML plugins so you can access your dashboard
2.3 Install and activate the Adminer plugin

(3)Temporary Access to your system
Could you please provide access to your system (wp-admin and ftp) so that I can further investigate this particular problem? The fields to provide this data are included in a private section that I will open for your next response. You can find it above the comments area. The information in this private section is only visible between WPML Support and you.

(4) Site Details
4.1 Can you please detail the database name for the site that has the problem?
4.2 Please indicate the menu you were editing.
4.3 If you were attempting to add a taxonomy as a menu item, if you are able to remember which taxonomy might have casued the problem - that could help as well.

Thanks for your collaboration.

March 14, 2016 at 8:21 am #836852

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Good morning.

I believe I have been able to resolve the database conflict.

I have attached the images of the database records showing the conflict. It appears that there used to be a ml-slider that was translated which was then deleted. However, the entries in the icl_translations table were not. When you created menu items, the same indexes were used and casued the conflict.

0. I activated the Meta Slider plugin.
1. I removed the icl_translation entries for the non-existant ml-slider translations using Adminer
2. I created a new test menu "WPML TEST"
3. I added items
4. I translated the new menu
5. I added items to the translated menu

No white screen appeared.

Can you see if you are now able to translate and add items to your main menu?

March 14, 2016 at 12:47 pm #837146

patrizio-romanoD

Ok, i think that this time the issue is fixed.
How can I avoid this to happen again?

Thanks 🙂

March 14, 2016 at 3:01 pm #837309

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hello.

Glad to hear this. I am not sure what could have caused this issue in the first place - so it´s difficult to say how to avoid it.

From what I could see, it looked like there was an ML Slider that existed, was translated and then deleted...but the remanents were left behind in the icl_translations table.

Perhaps to be safe, you could do the following:
1. Create a slider
2. Translate it
3. Delete the slider
4. Attempt to add a menu item to a translated menu.

This would replicate the conditions that I believe existed. If it repeats, then we know there might be a problem with deletion of slider translations.

The topic ‘[Closed] White screen of death in multisite while creating menu’ is closed to new replies.