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.

This topic contains 5 replies, has 1 voice.

Last updated by Waqas Bin Hasan 1 week, 1 day ago.

Assisted by: Waqas Bin Hasan.

Author Posts
December 6, 2024 at 1:48 pm #16486325

orO

Background of the issue:
I am trying to have YouTube videos work on both the original and translated pages of my website. This is the original page: hidden link and this is its translation: hidden link

But the videos are broken on the translation

Symptoms:
The YouTube videos work on the original page but are broken on the translated page.

Questions:
Why are the YouTube videos not working on the translated page?
How can I fix the broken videos on the translated page?

December 8, 2024 at 7:57 am #16489249

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello,

Thank you for contacting WPML support. Before your ticket is assigned to a supporter, I’d like to provide some detailed steps to help you resolve the issue.

On the original page I see the youtube url is added as:
hidden link;

and on the translations I see the youtube url is added as:
hidden link;?enablejsapi=1&origin=hidden link;

[/embedyt] is something I see added on the translations and if I remove it it works.

So can you let us know how are you adding the content, if you are adding the shortcode yourself, can you make sure to add the shortcodes without any spaces and udpate the translations to is works, like

[embedyt]<em><u>hidden link</u></em>;

Instead of

[embedyt]
<em><u>hidden link</u></em>;

Let me know if these steps resolve the issue or if you need further assistance.

Thanks

December 8, 2024 at 4:14 pm #16490093

orO

Hello,
Thank you for your help.

We use this plugin to embed YouTube Videos: https://wordpress.org/plugins/youtube-embed-plus/
We have their paid version.

Here is the part with the videos on the Original page, we use classic editor, we do not use page builders.

<h2>סיור בסדנת Kennerton</h2>
<p>בסרטונים ניתן לצפות בחלק מתהליך הייצור של אוזניות Kennerton. השמע בשפה הרוסית, אבל קל להתרשם גם מבלי להבין את הנאמר.</p>
[embedyt]<em><u>hidden link</u></em>;
<div class="spacer-l"></div>
[embedyt]<em><u>hidden link</u></em>;
<div class="spacer-xxl"></div>

There are no spaces I can eliminate.
I've attached a screen-shot.

How can WPML to stop breaking the short codes\videos?

Screenshot 2024-12-08 181236.png
December 8, 2024 at 4:53 pm #16490181

orO

Providing more information

I went to Pages, switched to English (the secondary language) opened the translated version, clicked "Edit Anyway" then I looked at the code.

In this version, there is indeed a line break.

<div class="spacer-xxl"></div>
<h2>A tour of Kennerton's workshop</h2>
<p>In the videos you can watch part of the production process of Kennerton's headphones. The audio is in Russian, but it is easy to get an impression even without understanding what is being said. </p>
[embedyt] 
<em><u>hidden link</u></em>;
<div class="spacer-l"></div>
[embedyt] 
<em><u>hidden link</u></em>;
<div class="spacer-xxl"></div>

I did not want to fix this and save as I think that would make the translated page only translatable manually from now on, something I do not want. I want both versions synced.

How can this be fixed?

December 8, 2024 at 4:59 pm #16490185

orO

OK, seeing your response time are very very slow I decided to act.

I edited the translated version into this:

<div class="spacer-xxl"></div>
<h2>A tour of Kennerton's workshop</h2>
<p>In the videos you can watch part of the production process of Kennerton's headphones. The audio is in Russian, but it is easy to get an impression even without understanding what is being said. </p>
[embedyt]<em><u>hidden link</u></em>;
<div class="spacer-l"></div>
[embedyt]<em><u>hidden link</u></em>;
<div class="spacer-xxl"></div>

Now it seems to be working.

December 10, 2024 at 11:56 am #16498035

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting the support. I'm assigned this ticket and 'll try my best to help you resolve the issue. Please also accept our apologies for delayed reply due to load in support forums.

I tried to reproduce the issue in a fresh sandbox site on the following links:

Default Gutenberg Editor:
- hidden link
- hidden link

Classic Editor:
- hidden link
- hidden link

I used "YouTube WordPress Plugin by Embed Plus" plugin to embed the videos (from your provided video URLs) and these seem to work just fine.

Perhaps something is conflicting in your site that is adding the extra space or line-break as mentioned by my colleague and as you noted. You can try reproducing the issue in my sandbox site (hidden link - one-click login). And note down the exact steps, in case it is reproducible in this sandbox site.

On the other hand, if it isn't reproducible in the sandbox site, then I'll recommend checking with only WPML plugins in your site to confirm if problem is really coming from the WPML. And we can continue further investigation.

IMPORTANT: Please take full backup of your website and database beforehand. 

It is highly advised to try this on a staging/dev site first, so your live website isn't compromised.

Please let me know your findings and I'll try my best to help you further on the matter.

Regards.