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 thread is resolved. Here is a description of the problem and solution.

Problem:

The oembed links printed in the section of my translated pages do not contain the correct URL. The language directory (for example /fr/) is missing from the URL, and it links to the original language.

Solution:

It is not clear what solved the issue in this case, but after a while, it was solved. You can try to re-save permalinks.

0% of people find this useful.

Tagged: 

This topic contains 7 replies, has 2 voices.

Last updated by Jean-Philippe 1 year ago.

Assigned support staff: Itamar.

Author Posts
October 5, 2018 at 2:40 am #2789409

Jean-Philippe

I am trying to:
Access the oembed links printed in the <head> of my site in a translated page

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

I expected to see:
hidden link

Instead, I got:
hidden link

The language "folder" seems to be missing so when we access the url, we get a 404 reponse
hidden link
VS
hidden link

October 7, 2018 at 9:44 pm #2794357

Itamar
Supporter

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

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

Hi.

Currently, when I try hidden link I do not get a 404. I get a page with a JSON content.

Do you see that it is OK now?
Have you fixed this issue already?

Regards,
Itamar.

October 8, 2018 at 6:36 pm #2797095

Jean-Philippe

Hello Itamar,

As stated in your formatted issue proformat, the URL containing the "/fr/" is what *I expect*, it is not what I'm getting.
Please look ate the source of the page hidden link, the urls on the source DO NOT contain the /fr/ part an thus return 404s.

This is the JSON reply I get:
{"code":"oembed_invalid_url","message":"Not Found","data":{"status":404}}

This is true of both the "application/json+oembed" AND the "text/xml+oembed" links generated by WP.

How can I ensure the language is added to these URLs ?

Thanks for your help,

JP

October 9, 2018 at 4:34 pm #2801141

Itamar
Supporter

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

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

Thanks, JP for explaining this issue further. I can see the wrong link now.

I have no experience with those kinds of links so while I'm also consulting our second tier supporters about it, please also try the following and elaborate on this issue.

1. If you go to WPML -> Settings -> Post Types Translation and set the 'oEmbed Responses (oembed_cache)' post type to 'Translatable - only show translated items', does it help to solve the problem?

2. If not, then please tell me a step by step process of how I can replicate this issue.
2A. How are you inserting those links in the head section?
2B. Is it with a plugin?
Sometimes screen-shots illustrating what you mean may go a long way to clarify what words fail to transmit, so if you like, make use of “upload an image” below the comment area.

Thanks,
Itamar.

October 10, 2018 at 8:34 pm #2805760

Itamar
Supporter

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

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

Hi.

I've discussed this with our second tier supporter and here is what he suggests.
Please try the minimum environment procedure.

I suspect that there is a collision with the theme or another plugin.
If possible get your site into a minimum environment.
Minimum environment means switching to a default WordPress theme like Twentyseventeen and no plugins activated but WPML.
Is it possible for you to try it?
You will need first to check if the problem persists when just the theme is switched to Twentyseventeen (for example).
If it persists, then turn off all plugins but the WPML and its add-ons and WooCommerce itself (leave WPML and its components active).
Then please check if the problem persists.
If it does not persists so start by activating the plugins one by one and check when the problem comes back. Then report to me which was the culprit plugin.

**** Important! Please make a full site backup (files and DB) before you proceed with those steps****

Regards,
Itamar.

October 12, 2018 at 12:19 am #2810069

Jean-Philippe

Hi, the only other plugin I have installed was Yoast SEO.
Deactivating it did not fix anything. Nor did reverting to TwentySeventeen.

October 14, 2018 at 2:56 pm #2815478

Itamar
Supporter

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

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

Hi.

Currently, when I check the link that you have given me I can see that the oembed links are correct and contain the /fr/ in them. Please see the attached screenshot.
Can you also see it?
Have you fixed the issue by now?

Regards,
Itamar.

October 14, 2018 at 4:30 pm #2815632

Jean-Philippe

Well I'll be.. ! 🙂
It does seem that the issue is resolved.
While I'm not sure what fixed it, thanks for your help anyway !