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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - |
- | 12:00 – 16:00 | 12:00 – 16:00 | 12:00 – 16:00 | 12:00 – 16:00 | 12:00 – 16:00 | - |
Supporter timezone: Europe/Zagreb (GMT+02:00)
Tagged: Bug
This topic contains 17 replies, has 0 voices.
Last updated by John-Pierre Cornelissen 44 minutes ago.
Assisted by: Dražen.
Author | Posts |
---|---|
June 24, 2025 at 11:14 am #17164431 | |
John-Pierre Cornelissen |
Background of the issue: Symptoms: Questions: |
June 24, 2025 at 11:27 am #17164487 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello, this is the ticket, let us know how it goes and if anything else we can do. Regards, |
June 25, 2025 at 8:38 am #17167686 | |
John-Pierre Cornelissen |
Hi, I have tested this and now I am 100% sure that it's WPML who changes the shortcode upon saving the translations from [ wpml _language _selector _widget ] Here is a screen recording that shows what/how it happens. Thanks Edit: I added spaces in the correct shortcode, because here too it changes the correct shortcode into the wrong one. |
June 25, 2025 at 9:26 am #17167937 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello, thanks for getting back and sharing video, that is very helpfully. Now we need to confirm if it is an bug or issue specify to your website. 1) If possible, can you test if issue happens when using Divi parent theme and only WPML plugins enabled, all other disabled? 2) For same reason a created test site with Divi, and tried to translate, but I do not get same issue, maybe there is specific Divi widget that needs to be used? Can you please check and try to reproduce it there? That way I can quickly escalate it further. - hidden link Let me know how it goes. Thanks, |
June 25, 2025 at 12:02 pm #17169069 | |
John-Pierre Cornelissen |
Hi, the same thing happens in the Sandbox. 1. Have a look as the demo user: there is one page, translations are correct |
June 25, 2025 at 12:54 pm #17169353 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello, thanks a lot for clear info and confirming the issue. I have confirmed it and escalated to our 2nd tier to check further, escalate and advise any workaround. I will update when I have some news. Regards, |
June 25, 2025 at 2:30 pm #17169922 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello, Seems we have this intentionally set. If a user does not have the ability to use a short code or the capability "unfiltered_html" then it will replace the short code with that. Workaround - add define constant to wp-config.php define('WPML_TRANSLATOR_CAN_USE_LS_SHORTCODE' true); Regards, |
June 25, 2025 at 2:51 pm #17170048 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello, sorry correct constant would be: define('WPML_TRANSLATOR_CAN_USE_LS_SHORTCODE', 'true'); Regards, |
June 26, 2025 at 8:26 am #17171933 | |
John-Pierre Cornelissen |
Hi Dražen, For what reason is this intentional? It doesn't make sense to me. There is a perfectly working shortcode in the source, so that same shortcode goes in the translation for a good reason. There is absolutely no reason for WPML damaging/changing it's own shortcode (or any other shortcode for that matter). Third party translators should only translate and do nothing else. Therefore they get the lowest WP role possible, which is a 'subscriber'. The next lowest role is a 'contributor' but they can also write posts. A translator shouldn't be doing that. Of course I can add that constant as a workaround, but why should I even be doing that if all I want is that a translator does the only thing WPML is meant to be doing? Nothing else. Also, does the same apply to the ATE? Thanks |
June 26, 2025 at 9:04 am #17172392 | |
John-Pierre Cornelissen |
Update to the previous, I have checked this further, and 'intentional' setting means that a translator needs to be a WP editor or admin to be able to use the same shortcode in the translations as is added to the source. This basically gives the translators the right to also edit all content and create/publish anything they like. That's not very well thought out. A translator should only translate and shortcodes in their translations should remain the same as in the source. WPML shouldn't damage them. And a translation manager or site admin shouldn't be required to a constant to disable this silly behaviour and make sure WPML does what it is supposed to do. |
June 26, 2025 at 9:27 am #17172505 | |
John-Pierre Cornelissen |
Sorry another one. I added the constant (see screen shot) and it does not fix the issue. |
June 26, 2025 at 11:04 am #17172988 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello JP, it is due the user role and unfiltered_html permission. This is more related Worpdress roles and capabilities then only WPML, but of course we respect it for security reasons. The unfiltered_html permission is a security feature in WordPress that prevents users from using iframes and code snippets in WordPress posts, plus also more advanced code such as Javascript. This unfiltered_html permission could be very dangerous in the wrong hands, so WordPress has disabled this permission for most users. By default, the unfiltered_html permission is only given to Super Admins, Administrators and Editors. It does not happen for ATE editor and works fine if you use ATE translation editor. As for constant not working, please make sure to re-send and re-translate. I have tested it before sharing it with you, and it works just fine on our side. I can share a video if needed. Regards, |
June 26, 2025 at 11:24 am #17173060 | |
John-Pierre Cornelissen |
Hi, It doesn't work for me. See this video: hidden link I know what the permission is for, but it absolutely makes no sense that WPML replaces it's own shortcode with something else. As if it doesn't trust itself. It cripples it's own functionality. You also see @0:33 in the video referenced above that the third party shortcode [ masterslider id="17" ] is kept as is in the translation. A translator, regardless what user role, should be able to use the same shortcodes that are also located in the source. So, it's only WPML's own shortcode that is being replaced. If that's not a bug, I don't know what else to call it. JP |
June 26, 2025 at 2:10 pm #17174068 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello JP, thanks for getting back, I understand your point of way, but I am afraid as I have explained above and there is working workaround / constant , our 2nd tier does not consider this a bug and the esclated ticket is closed from our side. If you disagree I can bring this up again and ask for second opinion. As for issue, please try to make a small change to default language page, save and then re-translate. If issue still happens please wp-admin access and FTP to your website, preferably staging site and I will check it out. Regards, |
June 27, 2025 at 6:07 am #17175802 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello JP, thanks for getting back. 1) Sure, I will share with 2nd tier and ask for second opinion and update you when I have some news. 2) Is it okay to take a copy of your website, for further debugging purpose? Regards, |