[Escalated to WPML Developers team] Reopen support Ticket
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.
Our wait time is higher than usual, please make sure you are meeting the minimum requirement - https://wpml.org/home/minimum-requirements before you report issues, and if you can take a look at current Known Issues - https://wpml.org/known-issues/. Thank you.
Hintergrund des Themas:
I am trying to use a code block in the Enfold theme with the following XML code: [the code is not working here. Please check it on the website] in the code element. The code language is set to XML. In the main language, everything is fine, but in the translation, everything is stripped out. Here are the URLs where the issue can be seen: hidden link and hidden link.
Die Symptome:
In the translation, the XML code is stripped out, whereas it appears correctly in the main language.
Fragen:
Why is the XML code stripped out in the translation?
How can I ensure the code block appears correctly in both languages?
Languages: English (English )German (Deutsch )French (Français )
Timezone: Europe/Zagreb (GMT+02:00)
This has been escalated to our Compatibility team and may take some debugging time, I'll get back to you as soon as I have any news or questions for you.
2. Access the WPML Advanced Translation Editor (ATE) and disable the "I prefer bigger segments" option. To do this:
- Click on the settings icon in the top-right corner of the ATE.
- Disable the **I prefer bigger segments** option.
Languages: English (English )German (Deutsch )French (Français )
Timezone: Europe/Zagreb (GMT+02:00)
It was marked as a resolved by a customer ( according to our system), perhaps it was done mistakenly?
In any case we are still investigating this because the issue does not happen for us in localhost environment, but it happens in our sandbox environment.
Languages: English (English )German (Deutsch )French (Français )
Timezone: Europe/Zagreb (GMT+02:00)
Can you try this and let me know if it worked in your case?
1. Locate the file:
`.../wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Enfold/class-wpml-compatibility-theme-enfold.php`
2. Open the file and navigate to **line 45**.
3. Identify the following existing code:
if ( wp_is_post_revision( $post_id ) ) {
return;
}
4. Add the following code snippet immediately after it:
// Check if the post content contains an Enfold Code Block.
if ( strpos( $post->post_content, '[av_codeblock' ) !== false ) {
// Skip processing if Enfold Code Block is detected.
return;
}
Languages: English (English )German (Deutsch )French (Français )
Timezone: Europe/Zagreb (GMT+02:00)
I am glad to hear it's working! We will address this issue in our plugin and will confirm if the solution remains as described above. I’ll provide an update here with details on when and where it will be resolved.