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.

Our next available supporter will start replying to tickets in about 1.50 hours from now. Thank you for your understanding.

Tagged: 

This topic contains 4 replies, has 3 voices.

Last updated by hugoM-8 1 year ago.

Assigned support staff: Bruno.

Author Posts
September 12, 2018 at 8:48 am

omarV

When I use:

hidden link <-- Normal (see "_embedded" content)

But when I use a url of my translation, f.i. English:

EN: hidden link <-- see _embedded content it returns 404 errors

How to fix?

September 13, 2018 at 8:37 pm #2732998

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you for contacting us.

I saw the problem you're reporting. Currently, the WP Rest API is not fully compatible with WPML.

I have forwarded your ticket to the 2nd tier support so they can check it out. Soon we will contact you.

Thank you.

October 4, 2018 at 9:03 am #2786836

omarV

I havent heard from 2nd tier support yet.

October 4, 2018 at 8:59 pm #2788771

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Sorry for the delay. Unfortunately, this is a compatibility issue. At the moment WPML is not fully compatible with the WP REST API.

Our compatibility team suggested the steps below:

- Open the file wp-includes/rest-api/class-wp-rest-server.php on line 824
- Comment this line:

// $path   = $request->get_route();

- Insert this line:

$path   = rtrim($request->get_route(), "/");

For example:

// $path   = $request->get_route();
$path   = rtrim($request->get_route(), "/");

That should fix the problem. Please note that since this is a change to the core of WordPress, this is not recommended to use in production.

Note also, that at this moment, the only solution is the above workaround. Our team is aware of this and will work to make the WP REST API fully compatible, but unfortunately, we do not have a deadline when this is going to be released.

Thank you.

October 11, 2018 at 2:58 pm #2808788

hugoM-8

This problem was introduced either in 4.0.6 or 4.0.7 as it's not required to edit core files in 4.0.5