Skip to content Skip to sidebar

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

Problem:

You are trying to translate a page to German using WPML Multilingual CMS, but it causes a site crash. The error reported is 'Uncaught TypeError: DOMElement::setAttribute(): Argument #2 ($value) must be of type string, array given'.

Solution:

We recommend taking a full site backup before proceeding with any changes. This issue might be related to a known problem discussed in our support forum. Please try the workaround suggested in the following thread: https://wpml.org/forums/topic/avada-form-translations-global-containers/#post-17170232.

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. Should you need further assistance, please do not hesitate to open a new support ticket at our 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 3 replies, has 0 voices.

Last updated by Bigul 8 months, 3 weeks ago.

Assisted by: Bigul.

Author Posts
July 28, 2025 at 6:37 pm #17276462

rikD-4

Background of the issue:
I am trying to translate the page hidden link to German using WPML Multilingual CMS (version 4.7.6), but it causes a site crash. I have already tried reinstalling the plugin, but the issue persists when I attempt to add the German translation.

Symptoms:
The site crashes when I try to add the German translation to the page hidden link. The error details include: 'Uncaught TypeError: DOMElement::setAttribute(): Argument #2 ($value) must be of type string, array given in /var/www/vhosts/achterhoeksgoed.nl/httpdocs/wp-content/plugins/sitepress-multilingual-cms/classes/xliff/wpml-tm-xliff.php:146'.

Questions:
Why does the site crash when I try to add a German translation?
How can I resolve the TypeError related to DOMElement::setAttribute()?

July 29, 2025 at 9:43 am #17278068

Bigul

Hello,

Welcome to the WPML support forum. I will do my best to assist you in resolving the issue.

This issue may be related to the following ticket:
https://wpml.org/forums/topic/avada-form-translations-global-containers/

Please try the workaround suggested in that thread after taking a full site backup, and check whether the issue persists.

https://wpml.org/forums/topic/avada-form-translations-global-containers/#post-17170232

--
Thanks!

Bigul

July 30, 2025 at 1:29 pm #17282328
rikD-4

I added this action to my functions.php, and this helps to go a step further.
Now i can add a translation to a page with the plus sign and see tre translated text and can save it, but then i get back to the page in the backend and the spinningwheel keeps rolling and rolling, and the tranlated language is not added and i can not save the page.
I've tried this several times but it will not be saved.
Is there any way to resolve this spinning wheeel?

New threads created by Bigul and linked to this one are listed below:

https://wpml.org/forums/topic/translation-not-saved-endless-spinning-wheel-after-adding-page-translation/

2025-07-30 15_28_27-Pagina bewerken “Minicamping” ‹ Achterhoeksgoed — WordPress — Mozilla Firefox.png
July 30, 2025 at 6:47 pm #17283150

Bigul

Hello,

Thank you for the updates. Please note that I have opened a new ticket for the "Translation Not Saved" issue. This will help us provide more efficient assistance and keep the discussion focused on each topic. I will respond to the new ticket shortly. Thank you for your understanding.

--
Thanks!

Bigul