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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Europe/Madrid (GMT+02:00)

Tagged: 

This topic contains 12 replies, has 0 voices.

Last updated by dominicC-10 9 hours, 22 minutes ago.

Assisted by: Marcel.

Author Posts
June 9, 2025 at 11:23 am #17118142

dominicC-10

Background of the issue:
I am trying to translate the user notification of an Avada form and troubleshoot an error when translating the 'Register Course' Avada Form. See my Loom screencast at hidden link.

Symptoms:
There has been a critical error on this website. Please check your site admin email inbox for instructions. If you continue to have problems, please try the support forums.

Questions:
How do I translate the user notification of an Avada form?
Why am I getting an error when trying to translate the 'Register Course' Avada Form?
With an Avada form in an Avada global container, should I translate the form first or the container first, or does it not matter?

June 9, 2025 at 3:23 pm #17118930

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Welcome to WPML Support. Just to make sure we are on the same page. In the erratume below:

https://wpml.org/errata/avada-form-notifications-not-available-in-translation-editor/

There was two set of things that needed to be done. One the code addition to the functions.php file and after that adding the XML code to WPML > Settings > Custom XML config (tab).

I just want to make sure you did the steps as mentioned.

The other point is that after that do a small change in the original language of the form and do not change anything on the translated version.

Then go to WPML > Translation Management and select the form and send it for translation.

After that go to WPML > Translations and see if this time you can enter Advancde translation editor to finish the translation.

One other point is that please enable the debug mode in WordPress so we cna see what is the error under the hood:

Would you please access your website files and edit the "wp-config.php" file on the root folder of your WordPress installation and add the code below into the file:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true );

Please add the code above the line below:

/* That's all, stop editing! Happy blogging. */

For more information:
https://wpml.org/documentation/support/debugging-wpml/

And super last thing is to follow the steps below:

- IMPORTANT STEP! Create a backup of your website. Or better approach will be to test this on a copy/staging version of the website to avoid any disruption of a live website.
- Go to "WordPress Dashboard > WPML > Support > Troubleshooting (link)".
- Click the buttons annotated in the screenshot below one by one and wait for each button process to finish:
https://wpml.org/wp-content/uploads/2020/10/7206941-buttons.png

If the problem persists, I'd appreciate it if you could give me the URL/User/Pass of your WordPress dashboard after you make sure that you have a backup of your website.
It is absolutely important that you give us a guarantee that you have a backup so if something happens you will have a point of restore.

Make sure you set the next reply as private.

Thanks.

June 10, 2025 at 1:11 pm #17121932

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Thank you very much. I checked the other ticket and I am not sure if it is related as it is talking about review and not the translation itself.

I tried to login but I constantly get an error that I attached the screenshot.

Would you please help me to understand what might be the cause that I can not login?

Screenshot 2025-06-10 at 5.09.32 PM.png
June 17, 2025 at 9:27 am #17141482

dominicC-10

Hi

This was because you asked me to set the 'WP_DEBUG_DISPLAY' to 'true'. Others experienced similar. I have disabled it but keep debug and logging true.

I did a further screencast yesterday of the issue as I was directed by Avada to visit the initial Avada form in the WP Editor/back-end Pagebuilder then hit the + icon next to each language in the sidebar metabox (after cancelling the form translation jobs). But this throws the same errors that generate an email as follows:

Howdy!

WordPress has a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

In this case, WordPress caught an error with one of your plugins, WPML Multilingual CMS.

First, visit your website (hidden link) and check for any visible issues. Next, visit the page where the error was caught (hidden link) and check for any visible issues.

Please contact your host for assistance with investigating this issue further.

If your site appears broken and you can't access your dashboard normally, WordPress now has a special "recovery mode". This lets you safely login to your dashboard and investigate further.

hidden link

To keep your site safe, this link will expire in 1 day. Don't worry about that, though: a new link will be emailed to you if the error occurs again after it expires.

When seeking help with this issue, you may be asked for some of the following information:
WordPress version 6.8.1
Active theme: Avada (version 7.12.1)
Current plugin: WPML Multilingual CMS (version 4.7.6)
PHP version 8.2.28

Error Details
=============
An error of type E_ERROR was caused in line 146 of the file /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/xliff/wpml-tm-xliff.php. Error message: Uncaught TypeError: DOMElement::setAttribute(): Argument #2 ($value) must be of type string, array given in /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/xliff/wpml-tm-xliff.php:146
Stack trace:
#0 /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/xliff/wpml-tm-xliff.php(146): DOMElement->setAttribute('resname', Array)
#1 /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/xliff/class-wpml-tm-xliff-writer.php(210): WPML_TM_XLIFF->setTranslationUnits(Array)
#2 /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/xliff/class-wpml-tm-xliff-writer.php(130): WPML_TM_Xliff_Writer->generate_xliff('159-a843dcb657a...', 'en', 'es', Array, 'hidden link...', 'post_fusion_for...')
#3 /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/functions-load-tm.php(575): WPML_TM_Xliff_Writer->generate_job_xliff('159', true)
#4 /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/functions-load-tm.php(548): wpml_tm_get_job_xliff('159', true)
#5 /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/menu/translation-queue/CloneJobs.php(74): wpml_tm_create_ATE_job_creation_model('159')
#6 /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/editor/Editor.php(312): WPML\TM\Menu\TranslationQueue\CloneJobs->cloneWPMLJob('159')
#7 /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/editor/Editor.php(169): WPML\TM\Editor\Editor->createATECounterpartForExistingWPMLJob(Array, Object(WPML_Post_Translation_Job))
#8 /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Either.php(207): WPML\TM\Editor\Editor->WPML\TM\Editor\{closure}(Object(WPML_Post_Translation_Job))
#9 /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Either.php(257): WPML\FP\Right->map(Object(Closure))
#10 /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/editor/Editor.php(175): WPML\FP\Right->chain(Object(Closure))
#11 [internal function]: WPML\TM\Editor\Editor->WPML\TM\Editor\{closure}(Array, Object(WPML_Post_Translation_Job))
#12 /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array(Object(Closure), Array)
#13 /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Logic.php(63): WPML\FP\{closure}(Object(WPML_Post_Translation_Job))
#14 [internal function]: WPML\FP\Logic::WPML\FP\{closure}(Object(Closure), Object(Closure), Object(Closure), Object(WPML_Post_Translation_Job))
#15 /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array(Object(Closure), Array)
#16 /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Either.php(207): WPML\FP\{closure}(Object(WPML_Post_Translation_Job))
#17 /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/editor/Editor.php(107): WPML\FP\Right->map(Object(Closure))
#18 /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/menu/translation-queue/class-wpml-translations-queue.php(52): WPML\TM\Editor\Editor->open(Array)
#19 /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-includes/class-wp-hook.php(324): WPML_Translations_Queue->load(Object(WP_Screen))
#20 /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#21 /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#22 /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-admin/includes/class-wp-screen.php(424): do_action('current_screen', Object(WP_Screen))
#23 /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-admin/includes/screen.php(243): WP_Screen->set_current_screen()
#24 /home/customer/www/staging2.fsukinternationalcollege.com/public_html/wp-admin/admin.php(213): set_current_screen()
#25 {main}
thrown

June 17, 2025 at 2:51 pm #17143081

dominicC-10

I also contacted Avada support about this and recorded this later screencast to highlight the issue:

hidden link

They have replied as follows:

------------------------

I enabled debug mode and saw this error, screenshot hidden link

As you could see the error is related directly to the WPML file.
I recommend you contact WPML support for investigation.
Also you can try to change PHP version to 8.0 or 7.4 and re-check the form translation.

------------------------

I have tried switching down to php 7.4 but the error persists.

Can you assist please?

June 18, 2025 at 4:05 pm #17147616

Marcel
Supporter

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

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

Hi,

I'm Marcel, and I'll be taking over your ticket.

Before we escalate this to our compatibility developers, we first need to confirm whether the issue can be reliably reproduced.

I’ve tested other forms, and they’re working as expected. However, when I clone this specific form, the issue reoccurs. Even after removing some fields, the problem persists.

It appears that something may be broken in this particular form ID. Could you try rebuilding a minimal version of the form as a test? So far, I haven’t been able to reproduce the issue in a different form, which makes it difficult to confirm whether it's a bug in the code.

Best regards,
Marcel

June 18, 2025 at 6:11 pm #17147996

dominicC-10

Marcel

interesting.

Are you aware that this Register form is used within several Avada portfolios and another page WITHIN an Avada global container? I haven't translated the global container yet as I thought it best to translate the form first.

I have also implemented the following already: https://wpml.org/errata/avada-form-notifications-not-available-in-translation-editor/

Just making you aware of these things.

I have now created the register form from scratch and called it 'Register Interest NEW' - see grab attached. The only difference this time is that I haven't included the avada Honeypot or reCaptcha form elements.

Please have a go translating this one and the notifications and let me know the process you follow to translate it. If successful, how should I go about putting this in the existing or new global avada container?

Screenshot 2025-06-18 at 19.06.59.png
June 19, 2025 at 3:25 pm #17151509

Marcel
Supporter

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

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

Hi,

Are you aware that this Register form is used within several Avada portfolios and another page WITHIN an Avada global container? I haven't translated the global container yet as I thought it best to translate the form first.

For my test, I kept it simple: I clicked the “+” icon inside the form, and the error appeared immediately. So the issue occurred without involving any global elements — I only translated that specific form.

Best regards,
Marcel

June 20, 2025 at 11:04 am #17154091

dominicC-10

Marcel

Your reply is unclear - Re 'For my test', do you mean when you originally tested the original register form, or subsequently on the 'Register Interest NEW' form?

From seeing hidden link it does seem you have tried translating the 'Register Interest NEW' form.

So are you still investigating the cause of this or escalating the issue?

June 20, 2025 at 2:31 pm #17154667

Marcel
Supporter

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

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

Hi,

I initially tested the original form, which is why I had asked you to try it with a new form to rule out form-specific issues. I’ve now done that myself by translating the one you created and the issue occurs there as well — even when I remove all fields and use just a simple text field.

As a temporary workaround, you can switch the translation of the form to the WPML Classic Editor via this URL:
hidden link
Once the form is translated, you can reactivate the Advanced Translation Editor.

After further testing and reviewing the stack trace, I’ve narrowed the issue down to the Admin/User Notification settings inside the form. The error is not caused by specific form fields, but only occurs when one of these notifications is active.

I’m now testing whether I can reproduce the issue from scratch. Based on the stack trace, it appears that there's no check to confirm if the value passed to setAttribute() is a string — if it's an array, this leads to a fatal error. Ideally, the function should skip or properly serialize non-string values before attempting to use them.

Best regards,
Marcel

June 20, 2025 at 4:53 pm #17154989

dominicC-10

OK, thanks for clarifying Marcel

Glad I have your support!

Notifications are enabled on the Contact form which has been translated OK?! Strange…

June 23, 2025 at 8:46 am #17158650

Marcel
Supporter

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

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

Hi,

The translation itself isn’t the issue. The problem lies in what is being delivered through the translation. It’s expected to be a string, but instead, we’re receiving an array.

Best regards,
Marcel

June 23, 2025 at 11:18 am #17159753

dominicC-10

Marcel, FYI I have another WPML support ticket at https://wpml.org/forums/topic/a-few-outstanding-translations-snags-with-avada-theme/page/2/ - just wondered if you were aware and if the two issues are related?