Skip Navigation

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: 

This topic contains 7 replies, has 0 voices.

Last updated by Dražen 2 hours, 59 minutes ago.

Assisted by: Dražen.

Author Posts
June 24, 2025 at 11:14 am #17164431

John-Pierre Cornelissen

Background of the issue:
I use the shortcode [wpml_disabled_selector_widget] to display the language switcher on my site hidden link. The translator, who has the WP user role subscriber, translates with the classic translation editor.

Symptoms:
When I receive the translated content, the shortcode in the translations is [wpml_disabled_selector_widget], which shows "You're not allowed to use this shortcode." in the front end.

Questions:
Why does the translation get a different shortcode?

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,
Drazen

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 ]
to
[wpml_disabled_selector_widget]

Here is a screen recording that shows what/how it happens.
hidden link

Thanks
JP

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,
Drazen

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
2. Send that page to the 'translator' user
3. Login as the 'translator' user, pw: rdD$wewRvakKUVhQ%sRkVBbw
4. Take the translations, make sure the shortcode in the source and target is the same and complete the translations
5. Have a look at the translated page, it shows "You're not allowed to use this shortcode."
6. Go back to the translations and you'll see the shortcode is incorrectly saved.

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,
Drazen

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,
Drazen

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,
Drazen