WPML

Overview of the Issue

When using the Enfold theme, XML code inserted into a code block (via the code element) appears correctly in the main language. However, in translated posts, the XML code is stripped out.

Workaround

This issue is fixed. Updating to the latest version solves it on your site, so you only need this workaround if you can’t update yet.

Please, make sure of having a full site backup of your site before proceeding.

  • Open …/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Enfold/class-wpml-compatibility-theme-enfold.php file.
  • Look for line 45.
  • Just after:
    if ( wp_is_post_revision( $post_id ) ) {
    	return;
    }
  • Add the following code:
    // 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;
    }

All known issues

Still Seeing This Issue?

If updating doesn’t fix it, ask a support question and we’ll look into it with you.