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 24 replies, has 12 voices.

Last updated by olafM-4 3 years, 11 months ago.

Assisted by: Jamal.

Author Posts
February 8, 2020 at 4:23 am #5451521

hai-anhV

Hi Team,

I am trying to optimize my site for SEO onpage, but i found 2 issue with 404 error from WP JSON Oembed at home page with WPML directory url such as
mydomain.com/en
mydomain.com/vi

The WP Json Oembed url of rest pages are okay.

The link to my site hidden link

Is there any way to fix that issue , hope you have any update for this bug.

Kind Regards,
Hai Anh.

Screen Shot 2020-02-08 at 11.16.27.jpg
Screen Shot 2020-02-08 at 11.16.27.jpg
February 10, 2020 at 3:18 pm #5462903

Radu

Hey,

Thank you for reaching out to the WPML support!

I just checked the oembed link on my testing website and everything works fine, even if I have the WPML plugin active. Can you tell me if the issue is still available on your website if you deactivate all the plugins except for WPML, and activate a default theme (like Twenty Nineteen), please?

This way we can make sure that this is not caused by some compatibility issues between WPMl and some other plugin (or theme) that you're using.

Also, is this issue going away if you change the language by directories to language as parameter? Last but not least, please make sure that you're using the latest versions WPML. I could find another thread with the same issue but it's two years old (and a plugin update fixed the issue at that point).

Thanks,
Radu

February 11, 2020 at 1:44 am #5465247

hai-anhV

Hi Radu,

I had checked by all the ways as your suggestion and i think this bug by WPML.
This issue only appear at home page with language by directories, and because of the SEO technical i could not change the url to language as parameter.

My WPML is the latest version but the bug is still alive, could you please check again ?

Thanks.
HA.

February 15, 2020 at 3:39 am #5497893

hai-anhV

Hi Dear,

I created new site with default wordpress theme and only installed WPML plugins.
After that, i set the language URL format with Different languages in directories and Use directory for default language.

Then i view the source code of the main page (domain/en) or (domain/vi)
You will see the Wp Json Oembed link like that :
<link rel="alternate" type="application/json+oembed" href="hidden link" />
<link rel="alternate" type="text/xml+oembed" href="hidden link" />

And those link got the 404 errors.

I mean this bug is from WPLM with Different languages in directories at home page (domain/vi , domain/en....)
So we do not need to transfer all my website data to your testing server.

This issue had appeared with the blank site with only WPML plugin.

Hope to receive your fix solution.

Thanks.
HA.

Screen Shot 2020-02-15 at 10.34.29.jpg
Screen Shot 2020-02-15 at 10.34.18.jpg
Screen Shot 2020-02-15 at 10.30.46.jpg
February 16, 2020 at 5:37 pm #5502423

Radu

Hey,

Is there any chance that you could give me access to the new site that you created, please? This way I can have a look at the other options you're using for WPML and see if I can spot what might be causing this.

I could see that you're using the Use directory for default language so I set the same option on my website and used this code for the HTML file:

<?php
header('Location: <em><u>hidden link</u></em>');
?>

but the oembed link still works fine. Can you tell me what code are you using on your website for the HTML file, please? The code I added will redirect the base link to the default language.

Thanks,
Radu

February 17, 2020 at 2:28 am #5503295

hai-anhV

Hi Radu,

My new site in localhost so i could not share to you. Yes i set use directory for default language and check the box HTML file, but this box i leave empty. Please view my capture image for this setting.

So, do i fill this field with your code ?

Thanks.
HA.

Screen Shot 2020-02-17 at 09.24.27.jpg
February 18, 2020 at 9:34 am #5513623

Noman
Supporter

Languages: English (English )

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

Radu is having holidays, I am going to step in to help you out.

I have followed below steps in order to reproduce this issue in fresh wp site:
1. Selected ‘Different languages in directories’ option from WPML >> Languages > Site Language > Language URL format.
2. Checked the ‘Use directory for default language’ checkbox and pressed ‘Save’ button.
3. Re-save the site permalinks.
4. Visited home page of my site.
5. Then checked the view source of the home page.
6. Then clicked on below links:

<link rel="alternate" type="application/json+oembed" href="<em><u>hidden link</u></em>" />

<link rel="alternate" type="text/xml+oembed" href="<em><u>hidden link</u></em>" />

And I can see this error:

{"code":"oembed_invalid_url","message":"Not Found","data":{"status":404}}

Could you please confirm if I’m following correct steps or I missed something so that I can escalate it to our 2nd tier support.

Thank you

February 19, 2020 at 10:12 am #5522359

hai-anhV

Hi Noman,

All your steps are correct.

February 20, 2020 at 1:11 pm #5533195

Noman
Supporter

Languages: English (English )

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

ok thanks for confirmation, I am going to escalate this to our 2nd tier support.

February 21, 2020 at 9:43 am #5538927

Noman
Supporter

Languages: English (English )

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

I have escalated this issue to our 2nd tier support for further review and will get back to you as soon as I hear back.

Thank you for your cooperation and patience.

February 22, 2020 at 1:15 am #5544487

hai-anhV

Hi,
Thanks for your confirmation. Hope to receive your feedback.

February 23, 2020 at 8:08 pm #5549779

Noman
Supporter

Languages: English (English )

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

Yes sure, I’ll get back to you as soon as I have some news. Thanks

February 26, 2020 at 7:48 pm #5573981

reymiC

Hi, i'm getting the same error in every translated page (more than 100) of my new website. Yo can make a broken link online check in hidden link and you will find lots of "404 Not Found" errors coming from lines that have "wp-json/oembed..." in the header

some-of-them-Grupo Interactivo.jpg
March 5, 2020 at 2:30 am #5621045

hai-anhV

Hi team,

hope you doing well. So do you have new update for this issue?

Thanks & Kind Regards,
Hải aNH.

March 5, 2020 at 3:33 pm #5627233

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Hello @hai-anhv and @reymic, As Noman is on vacation for a couple of days, I'll continue on this ticket.

Our 2nd Tier has found the cause of the issue and escalated it to our developers. Unfortunately, there is no easy workaround for the moment. We'll need an update from the developers team.

I'll keep you posted once we have more insights.

Best regards,
Jamal

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.