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.

This topic contains 8 replies, has 2 voices.

Last updated by Itamar 1 year, 1 month ago.

Assigned support staff: Itamar.

Author Posts
March 30, 2019 at 1:11 pm #3498555

beat loew

I am trying to:
I added a Nectar Element "RAW HTML ELEMENT" in order to add some code e.g. "<span>text</span>*

Link to a page where the issue can be seen:
hidden link

I expected to see:
in german i also expect to see "<span>Text-DE</span>

Instead, I got:
translated in german, the HTML Tag is removed and there is only "text". without html tag

March 31, 2019 at 8:58 pm #3502625


Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)


Could please elaborate on this issue?
Are you referring to an element from the Salient WPBakery Page Builder?

Please also correct the following and check if it helps to solve the issue.
By looking at the debug info that you have attached I can see that your server is running an older version of MySQL and also your server WP Memory Limit is set to 40M.
Our recommendations are to have the following as minimal requirements:
- PHP 5.3 and above (this OK with your installation) with a WP Memory Limit of at least 128MB and more if possible.
- MySQL 5.6 and above.
Please follow this link for detailed documentation:
Is it possible for you to change those to the minimum requirement?
You may need to contact your hosting provider for that.
Meeting those baseline requirements is most critical before starting to debug and sometimes solves issues like you experiencing.
Most important is to raise the WP Memory Limit.
Please try to raise it before you contact your hosting company.
You can try and do it from the wp-config.php file in your WordPress installation.
Insert this code in that file.

/** Memory Limit */
define('WP_MEMORY_LIMIT', '256M');
define( 'WP_MAX_MEMORY_LIMIT', '256M' );

Add it before this line:
/* That's all, stop editing! Happy blogging. */

Could you please perform those procedures and see if they help?


April 1, 2019 at 9:36 am #3505931

beat loew

Yes i'm refering to the Salient WPBakery Page Builder. Please check attached screenshot. There is the <span> tag. As soon i translate it to german. the <span> tag is removed in the Raw HTML element.

The configuration of server did not solve this issue

April 2, 2019 at 10:24 am #3515965


Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)


When translating your page, do you use WPML's Classic Translation Editor?
I ask that because then if you switch to the 'Text' tab instead of the "Visual' tab before you copy the element with the HTML code then it should be fine. Please see the attached screenshot.

If this is not the issue, then I'll need to reproduce the problem on a clean WordPress installation. Then I'll be able to escalate it to our compatibility team to see if they can find a fix for this issue. But I do not have with me the latest version of the Salient theme and the Salient WPBakery Page Builder.

So for this, I created a test website with a clean WordPress install. You can access it through this link:
hidden link
Through this link, you will be automatically logged in. (If nobody logs in the test site will be available for one week from today.)
Could you please install the Salient theme and the Salient WPBakery Page Builder and see if the issue is replicable on a clean WordPress installation?
Please configures WPML as it is configured on your site.
Please also make sure that you are installing the latest version of the plugin.


April 2, 2019 at 12:04 pm #3516835

beat loew

Please check attached screenshot. <span> tag is in Text and Visual editor removed even before i translate it.

April 2, 2019 at 1:41 pm #3517953

beat loew

just installed on the test environment. you can reproduce the issue in this link

hidden link

April 2, 2019 at 6:44 pm #3520033


Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi and thanks for setting everything up on our test site.

OK, I get the issue now. Here is how you can fix it.

1. Go to WPML -> Settings -> Custom XML Configuration (tab).

2. Place this code in the XML code section.

      <tag encoding="base64">vc_raw_html</tag>

3. Press the 'Save' button.

4. Now things will work for you as expected.

This is also mentioned in our documentation here.

You can see that I've fixed it on our test site.

Please let me know if it is also working on your site.


April 12, 2019 at 9:38 am #3597145

beat loew

Now it works if i use Text editor.
But if i click once on the tab Visual editor and then back to Text editor, the Tag is removed again.
Attached some screenshots showing the problem


April 14, 2019 at 3:26 pm #3608345


Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Beli.

I've done some research on this subject and found out that this issue is known to us. It is happening with HTML tags like SPAN and P. The thing is that this is not an issue that is being caused by WPML. This is an issue that is being caused by limitations of the TinyMCE editor which WordPress uses. hidden link. Even if you use the SPAN tag on the WordPress editor when WPMl is not active or installed, you will get the same problem. The SPAN tag will be lost if you switch from the text to the Visual editor and back. Nevertheless, I've found that there is a workaround for this issue. You can see a reference for this workaround here. hidden link. What you need to do is the following.

1. Edit the functions.php file of your theme and add the following code.

function pp_override_mce_options($initArray) {
   $opts = '*[*]';
   $initArray['valid_elements'] = $opts;
   $initArray['extended_valid_elements'] = $opts;
   return $initArray;
add_filter('tiny_mce_before_init', 'pp_override_mce_options');

2. Save the file.
3. Add a SPAN tag in the page that you are editing and update the page.
4. Now, even if you switch to the Visual editor and back to the Text editor, you wouldn't loose the SPAN tag.
Note: It wouldn't recover the already lost SPAN tags. There also WordPress plugins that help add this functionality to the TinyMCE editor. They are mentioned in the link that I've added. I've tried this method, and it works.

I hope that this information is helpful to you.