Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The following error appears after activating WPML:

PHP Fatal error: Uncaught InvalidArgumentException: element_id and type do not match in \wp-content\plugins\sitepress-multilingual-cms\classes\core-abstract-classes\class-wpml-set-language.php on line xx

Solution:
This kind of error probably happens because of corrupt entry or misconfiguration in the Database. Please try the following steps after creating a full database and website backup:

1- Open your database using phpMyAdmin(or another database manager)
2- Go to the wp_icl_translations table
3- Find the entry with element_id: XXX (The ID number you see in the error)
4- Delete that row

Relevant Documentation:
https://wpml.org/errata/fatal-error-invalidargumentexception-element_id-and-type-do-not-match/

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 6 replies, has 2 voices.

Last updated by martinP-95 3 years ago.

Assisted by: Mohamed Sayed.

Author Posts
April 2, 2022 at 6:30 am #10934219

martinP-95

I am trying to:actived WPML

Link to a page where the issue can be seen:hidden link

I expected to see:

Instead, I got:

2022-04-02 (2).png
2022-04-02.png
2022-04-02 (1).png
April 3, 2022 at 10:00 am #10937877

Mohamed Sayed

Hi Martin,
Thanks for contacting WPML support.

This kind of error probably happens because of corrupt entry or misconfiguration in the Database. Please try the following steps after creating a full database and website backup:

1- Open your database using phpMyAdmin(or another database manager)
2- Go to the wp_icl_translations table
3- Find the entry with element_id: 777
4- Delete that row

Please check the following errata page for more details: https://wpml.org/errata/fatal-error-invalidargumentexception-element_id-and-type-do-not-match/

Let me know please if that helps.

Regards,
Mohamed

April 4, 2022 at 12:43 pm #10944311

martinP-95

I couldn’t find row whit id 777 in wp-icl-translations table and I restore all data base from back up. Now I install WPML again and start configuration. First not recognized pages, menu and logo, then I change the language option of every page from English to Bulgarian(originally I keep the Bulgarian version because have a problem to migrate from Q-translate to WPML.
However when I start to upload logo, boom 💥 again fatal crash errors!

April 4, 2022 at 6:11 pm #10947651

martinP-95

By the way, I'm using Avada theme and Wpml plugin is confusing whit this theme

2022-04-04 (1).png
April 4, 2022 at 10:15 pm #10948871

Mohamed Sayed

Hi,

1) I would need to request temporary access (WP-Admin and FTP) so I can investigate this issue further.
– preferably to a test site where the problem has been replicated if possible –

Your next answer will be private, which means only you and I have access to it.

❌ Please backup your database and website before providing us with access details ❌

✙ I would additionally need your permission to de-activate and re-activate Plugins and the Theme and to change configurations on the site if needed. This is also a reason the backup is critical.

2) Please install the following plugin so I can check the wp_icl_translations table https://wordpress.org/plugins/wp-phpmyadmin-extension/

Thanks for your cooperation

April 5, 2022 at 12:16 pm #10953749

Mohamed Sayed

Hi,

I checked the site/database and found the entry with element_id: 777

I've deleted the row and then applied the Clean up options under WPML > Support > Troubleshooting > Clean up.

Please check again and let me know if the issue is resolved.

Regards,
Mohamed

Element_ID 777.png