Skip Navigation

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

Problem:
The client encountered an error in the 'Translation Management' menu when trying to assign content to a translator. The error message was 'DOMNode::removeChild(): Argument #1 ($child) must be of type DOMNode, null given'. This occurred after upgrading from PHP 8.0 to PHP 8.3.
Solution:
We recommended the client to:
1. Create a full backup of the site.
2. Update any outdated plugins or themes.
3. Flush any cache memory that might exist.
4. Deactivate all plugins, including WPML ones.
5. Activate a default WordPress theme, like Twenty Twenty.
6. Activate the WPML plugins.
7. If the issue is resolved, reactivate the theme and then the plugins one by one to identify the cause.

If the solution provided here is not relevant due to being outdated or not applicable to your case, we highly recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket with us.

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 Carlos Rojas 1 year, 2 months ago.

Assisted by: Carlos Rojas.

Author Posts
April 2, 2024 at 8:50 am #15471527

andreaP-22

HI,
I am in the "Translation management" menu and I would like to assign content to a translator.
I select the items, then check "Assign to a translator" and click "Add to translation cart".

I get this error:

DOMNode::removeChild(): Argument #1 ($child) must be of type DOMNode, null given
in /www/wordpress/web/app/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Gutenberg/strings-in-block/dom-handler/dom-handle.php (line 37)
$html = mb_convert_encoding( $html, 'HTML-ENTITIES', 'UTF-8' ); $dom->loadHTML( '<div>' . $html . '</div>' ); \libxml_clear_errors(); // Remove doc type and <html> <body> wrappers $dom->removeChild( $dom->doctype ); /** * $dom->firstChild->firstChild->firstChild is node that we are intersted in (without body tags). * $dom->firstChild Old node that we are replacing */

Screenshot 2024-04-02 alle 10.48.39.png
April 2, 2024 at 10:21 am #15472055

Carlos Rojas
WPML Supporter since 03/2017

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

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

Hello,
Thank you for contacting us

I kindly ask you to follow these steps to isolate the cause of the issue:
- Create a full backup of the site
- Update any outdated plugins or themes
- Flush any cache memory that might exist
- Deactivate all plugins, including the WPML ones
- Activate a default WordPress theme, like Twenty Twenty
- Activate the WPML plugins
- If the issue disappears, start by activating the theme and then the rest of the plugins, one by one, until the issue appears again and you can find the culprit.

Could you tell me the results of the steps described above?

Regards,
Carlos

April 2, 2024 at 12:37 pm #15472932

andreaP-22

I upgrade PHP 8.0 to PHP 8.3 and now it works!

April 2, 2024 at 12:48 pm #15472943

Carlos Rojas
WPML Supporter since 03/2017

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

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

Hi there,

I'm glad to hear that the issue is solved 🙂

Please don't hesitate to contact us if you need our help in the future with WPML. We will be more than happy to help.
Best regards,
Carlos