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: 

This topic contains 3 replies, has 2 voices.

Last updated by Bigul 9 months ago.

Assigned support staff: Bigul.

Author Posts
January 16, 2019 at 2:29 am #3095444

duarteC

Hi,
I'm having this error.

Fatal error: Uncaught InvalidArgumentException: element_id and type do not match for element_id:2736 the database contains post_attachment while this function was called with post_product in /home2/duartecosta/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php:32 Stack trace: #0 /home2/duartecosta/public_html/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(1433): WPML_Set_Language->set(2736, 'post_product', false, 'pt-pt', NULL, true) #1 /home2/duartecosta/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-post-translation.class.php(413): SitePress->set_element_language_details(2736, 'post_product', false, 'pt-pt', NULL) #2 /home2/duartecosta/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-post-translation.class.php(260): WPML_Post_Translation->maybe_set_elid(false, 'product', 'pt-pt', 2736, NULL) #3 /home2/duartecosta/public_html/wp-content/plugins/sitepress-multilingual- in /home2/duartecosta/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php on line 32

unfortnantly I inserted several products with this error. This caused that I cant use your solution:
https://wpml.org/forums/topic/wpml-is-throwing-an-fatal-error/#post-1372939

because there are still errors in the DB that I dont know the ID.

How can I solve this?

January 16, 2019 at 2:01 pm #3098090

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve these issues.

This may be happening because of the corrupt entry or misconfiguration in the Database. Please try the following steps after a site backup and check the errors are still existing or not.

1) Go to your database using phpMyAdmin(or something similar)

2) Go to wp_icl_translations database table(maybe table prefix will be different in your case)

3) Find entry with element_id:2736 and delete that row

If you are still having the issue, please try the following troubleshooting steps after a site backup and make sure the issue is existing or not.

1) Go to WPML>>Support page
2) Click on Troubleshooting link (blue link in the middle of the page)
3) In Troubleshooting page, please click on the following options of the *Clean up* section. Wait for confirmation of processing after each one.

- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Set language information
- Assign translation status to duplicated content
- Fix terms count
- Fix post type assignment
- Recreate ST DB cache tables

--
Thanks!

Bigul

January 16, 2019 at 3:09 pm #3098234

duarteC

Hi Bigul,

Thx for your assistance.

I get an ERROR on the "Assign translation status to duplicated content" step.

Did try to crate a new page and a new product and seems to be working fine.

Should assume its all fine even doe returned that ERROR on the "Assign translation status to duplicated content". Right :)??

thx again,

Duarte

January 16, 2019 at 5:34 pm #3098928

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi Duarte,

Thank you for the updates. Just to make sure, have you deleted the *element_id:2736* from *wp_icl_translations* table?

Please share more details about the following for a better understanding. It will be great if you can share a screenshot. Are you getting any error in *Debug.log* while having this issue?

I get an ERROR on the "Assign translation status to duplicated content" step.

--
Thanks!

Bigul

The topic ‘[Closed] Fatal error: Uncaught InvalidArgumentException’ is closed to new replies.