Skip Navigation

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

Problem:
You are experiencing a critical error when trying to access a translation assigned to you. The error message suggests checking the site admin email for instructions, and the error details indicate an issue with the WPML Multilingual CMS plugin, specifically a TypeError in the Labels.php file.
Solution:
If you're encountering this issue, we recommend the following steps:
1) Navigate to WPML>>Settings>>Custom Fields Translation
2) Click on the System fields link
3) Search for fields by

*_themify*

4) Select the Don't translate option for

*_themify_builder_settings_json*

5) Save the changes
6) Re-send the content for translation in WPML > Translation Management
Please ensure to perform these steps after a full site backup. If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.

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

Last updated by Lucas Vidal de Andrade 2 weeks, 5 days ago.

Assisted by: Lucas Vidal de Andrade.

Author Posts
March 24, 2025 at 11:34 am

jean-marcL-3

Background of the issue:
I am trying to access a translation assigned to me. When I attempt this, I encounter a critical error on the website. The error message suggests checking the site admin email inbox for instructions. I expected to see the translation interface. The error details indicate an issue with the WPML Multilingual CMS plugin.

The error occurred on the page: hidden link.

I am currently running with these versions:
WordPress version 6.7.2
Active theme: Themify Ultra (version 7.9.2)
Current plugin: WPML Multilingual CMS (version 4.7.2)
PHP version 8.2.27

I received an email with error details which includes that a stack trace:

An error of type E_ERROR was caused in line 23 of the file /www/wp-content/plugins/sitepress-multilingual-cms/classes/utilities/Labels.php. Error message: Uncaught TypeError: strtr(): Argument #1 ($string) must be of type string, array given in /www/wp-content/plugins/sitepress-multilingual-cms/classes/utilities/Labels.php:23
Stack trace:
#0 /www/wp-content/plugins/sitepress-multilingual-cms/classes/utilities/Labels.php(23): strtr(Array, Array)
#1 /www/wp-content/plugins/sitepress-multilingual-cms/classes/xliff/class-wpml-tm-xliff-writer.php(599): WPMLUtilitiesLabels::labelize(Array)
#2 /www/wp-content/plugins/sitepress-multilingual-cms/classes/xliff/class-wpml-tm-xliff-writer.php(335): WPML_TM_Xliff_Writer->get_extra_data(Object(stdClass), Object(stdClass))
#3 /www/wp-content/plugins/sitepress-multilingual-cms/classes/xliff/class-wpml-tm-xliff-writer.php(312): WPML_TM_Xliff_Writer->process_elements(Object(stdClass), Object(stdClass), Array, true)
#4 /www/wp-content/plugins/sitepress-multilingual-cms/classes/xliff/class-wpml-tm-xliff-writer.php(117): WPML_TM_Xliff_Writer->get_job_translation_units_data(Object(stdClass), true)
#5 /www/wp-content/plugins/sitepress-multilingual-cms/inc/functions-load-tm.php(575): WPML_TM_Xliff_Writer->generate_job_xliff(490, true)
#6 /www/wp-content/plugins/sitepress-multilingual-cms/inc/functions-load-tm.php(548): wpml_tm_get_job_xliff(490, true)
#7 /www/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/Hooks/class-wpml-tm-ate-jobs-actions.php(153): wpml_tm_create_ATE_job_creation_model(490, true)
#8 [internal function]: WPML_TM_ATE_Jobs_Actions->{closure}(490, 0)
#9 /www/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php(151): array_map(Object(Closure), Array, Array)
#10 [internal function]: WPMLFPFns::WPMLFP{closure}(Object(Closure), Array)
#11 /www/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array(Object(Closure), Array)
#12 [internal function]: WPMLFPFns::WPMLFP{closure}(Object(Closure), Array)
#13 /www/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php(56): call_user_func_array(Object(Closure), Array)
#14 /www/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/Hooks/class-wpml-tm-ate-jobs-actions.php(152): WPMLFPFns::__callStatic('map', Array)
#15 /wordpress/wp-includes/class-wp-hook.php(324): WPML_TM_ATE_Jobs_Actions->added_translation_jobs(Array, 1, Object(WPML_TM_Translation_Batch))
#16 /wordpress/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
#17 /wordpress/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#18 /www/wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php(1507): do_action('wpml_added_tran...', Array, 1, Object(WPML_TM_Translation_Batch))
#19 /www/wp-content/plugins/sitepress-multilingual-cms/classes/class-wpml-translation-job-factory.php(112): TranslationManagement->send_jobs(Object(WPML_TM_Translation_Batch), 'post', 1)
#20 /www/wp-content/plugins/sitepress-multilingual-cms/classes/jobs/Manual.php(164): WPML_Translation_Job_Factory->create_local_job('1822', 'en', NULL, 'post_post', 1, 'fr')
#21 /www/wp-content/plugins/sitepress-multilingual-cms/classes/jobs/Manual.php(43): WPMLTMJobsManual->createLocalJob('1822', 'fr', 'en', 'post_post')
#22 /www/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Either.php(207): WPMLTMJobsManual->createOrReuse(Array)
#23 /www/wp-content/plugins/sitepress-multilingual-cms/classes/editor/Editor.php(103): WPMLFPRight->map(Array)
#24 /www/wp-content/plugins/sitepress-multilingual-cms/classes/menu/translation-queue/class-wpml-translations-queue.php(52): WPMLTMEditorEditor->open(Array)
#25 /wordpress/wp-includes/class-wp-hook.php(324): WPML_Translations_Queue->load(Object(WP_Screen))
#26 /wordpress/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#27 /wordpress/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#28 /wordpress/wp-admin/includes/class-wp-screen.php(424): do_action('current_screen', Object(WP_Screen))
#29 /wordpress/wp-admin/includes/screen.php(243): WP_Screen->set_current_screen()
#30 /wordpress/wp-admin/admin.php(212): set_current_screen()
#31 {main}
thrown

Symptoms:
There has been a critical error on this website. The error message suggests checking the site admin email inbox for instructions. The error details indicate an issue with the WPML Multilingual CMS plugin, specifically a TypeError in the Labels.php file.

Questions:
How can I resolve the critical error when accessing a translation assigned to me?
What steps should I take to fix the TypeError in the WPML Multilingual CMS plugin?

March 24, 2025 at 12:05 pm
March 24, 2025 at 3:11 pm #16852870

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

This error is happening because of a wrong translation setting for *Themify* a Custom field. We are getting the expected results in our local copy after the following steps.

1) Visit WPML>>Settings>>Custom Fields Translation
2) Click on *System fields* link
3) Search the fields by *_themify*
4) Choose *Don't translate* option for *_themify_builder_settings_json*
5) Save the changes
6) Re-send the content for translation in WPML > Translation Management

Please try it on your site after a full site backup and let us know your feedback. Refer to the attached images for more details.

16843019-2025_03_21_13h02_35.png