Skip Navigation

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

Problem:
You are trying to embed a Google map on your page, but the visual box has disappeared, leaving only the HTML version visible in the Classic Translation Editor (CTE). Previously, a code change involving the removal of 'iframe' from a blacklist in a specific PHP file resolved the issue, but the code has disappeared after an update.
Solution:
If you're experiencing this issue, we recommend you edit the file at

wp-content/plugins/sitepress-multilingual-cms/classes/translation-jobs/ExtraFieldDataInEditor.php

. Previously, the modification was made at line 155, but due to updates, it has now moved to line 199. You should locate the blacklist array and modify it by removing 'iframe' from it, changing the line from:

$black_list = ['script', 'style', 'iframe'];

to

$black_list = ['script', 'style'];

This change should restore the visual box in the CTE.

Please note that this solution might be irrelevant if it's 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. If the issue persists, please open a new support ticket at WPML support forum for further assistance.

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 1 voice.

Last updated by Dražen 2 months ago.

Assisted by: Dražen.

Author Posts
April 10, 2025 at 12:57 pm #16918721

yusufK-2

Background of the issue:
I am trying to embed a Google map on the page, but the visual box disappeared, and I only see the HTML version in the Classic Translation Editor (CTE). A few weeks ago, Osama helped me change a code, and it worked. Now, I checked if the code is still there, but it's disappeared. The line 155 is totally empty. Would it be the reason for the problem? Thank you. 1- Edit the (wp-content/plugins/sitepress-multilingual-cms/classes/translation-jobs/ExtraFieldDataInEditor.php) file 2- Replace the following line 155 $black_list = [ 'script', 'style', 'iframe' ]; With $black_list = [ 'script', 'style' ]; Link to a page where the issue can be seen: hidden link

Symptoms:
The visual box does not appear in the Classic Translation Editor, and only the HTML version is visible.

Questions:
Would the missing code on line 155 be the reason for the problem?

April 11, 2025 at 4:03 am #16920868

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Welcome to the WPML support forum. Before passing this thread to my colleague, I would like to share some suggestions and possible solutions for the issues you mentioned.

Does it happen after upgrading to the latest version of WPML (4.7.3)? If so, the fix code you have applied will be cleared after the upgrade.

So please try the workaround suggested in the following ticket after a full site backup and make sure the bug exists or not.

https://wpml.org/forums/topic/classic-transltion-editor-contains-htlm/

Hope this one is not related to the following ticket. Please confirm.

https://wpml.org/forums/topic/the-body-part-is-not-visible-in-classic-translation-editor-2/

--
Thanks!

Bigul

April 11, 2025 at 10:39 am #16922175

yusufK-2

Hello,

As I wrote you in my previous message, Linee 155 is empty, there is nothing to change. In the meantime they are different tickets.

Thank you,

YS

10.jpg
April 15, 2025 at 6:49 am #16931759

Dražen
Supporter

Languages: English (English )

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

Hello Yusuf,

Yes, seems the lines changed a bit after the last update, but the file and fix are the same. You need to find blacklist part and remove iframe part from it.

Currently, you find the same line in line 199.

Regards,
Drazen