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 1 reply, has 2 voices.

Last updated by Bigul 1 year, 6 months ago.

Assigned support staff: Bigul.

Author Posts
May 9, 2020 at 12:00 am #6091827

karzanK

I can't ACF fields translate, and don't show (+) to translate fields:
and wordpress sent me the below detail about the error:

WordPress version 5.4.1
Current theme: Hello Elementor Child (version 1.0.1)
Current plugin: WPML Multilingual CMS (version 4.3.12)
PHP version 7.4.5

Error Details
=============
An error of type E_ERROR was caused in line 32 of the file /home/uogeduiq/public_html/en/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:2011 the database contains post_attachment while this function was called with post_acf-field-group in /home/uogeduiq/public_html/en/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php:32
Stack trace:
#0 /home/uogeduiq/public_html/en/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(1503): WPML_Set_Language->set(2011, 'post_acf-field-...', false, 'en', NULL, true)
#1 /home/uogeduiq/public_html/en/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-post-translation.class.php(337): SitePress->set_element_language_details(2011, 'post_acf-field-...', false, 'en', NULL)
#2 /home/uogeduiq/public_html/en/wp-content/plugins/sitepress-multilingual-cms/inc/post-translation/wpml-post-translation.class.php(181): WPML_Post_Translation->maybe_set_elid(false, 'acf-field-group', 'en', 2011, NULL)
#3 /home/uogeduiq/public_html/en/wp-content/plugins/sitepress

* Attached the error when I try to publish a new post!

tempk-wpml-post error.png
May 11, 2020 at 8:34 pm #6106955

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 the issue.

This error is happening because of corrupt entry or misconfiguration in the Database. In this case, element_type which has element_id 2011 of wp_icl_translations database table doesn't match post_attachment of this entry in wp_posts database table.

Please try the following steps after a full site backup and make sure the issue is existing or not.

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

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

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

--
Thanks!

Bigul

The topic ‘[Closed] sitepress-multilingual-cms error with acf and publish post error’ is closed to new replies.