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.

WordPress 6.7 has introduced a new issue that impact translations, please update WooCommerce and WPML to the latest versions before you report issues. More about this here - https://wpml.org/errata/php-error-wp-6-7-notice-function-_load_textdomain_just_in_time-was-called/
Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 14:00 8:00 – 14:00 8:00 – 14:00 8:00 – 14:00 8:00 – 14:00 -
- 15:00 – 17:00 15:00 – 17:00 15:00 – 17:00 15:00 – 17:00 15:00 – 17:00 -

Supporter timezone: Europe/Madrid (GMT+01:00)

Tagged: 

This topic contains 3 replies, has 3 voices.

Last updated by Nigel 1 year, 2 months ago.

Assisted by: Nigel.

Author Posts
August 29, 2023 at 9:36 am #14305771

bjarteL

Hi there!

We are using wordpress as headless CMS and trying to consume all it's data by graphql. For this we are using nodeByUri to get data for posts and pages by it's Uri (following this article: hidden link). Our default language is set as English. This is working for English Uri but not for translated Uri.

for example, nodeByUri(uri: "example-page") is working but nodeByUri(uri: "de/beispielseite") returned null.

This also apply in frontpage also. nodeByUri(uri: "/") is working but nodeByUri(uri: "de/") returned null.

But posts are working for both default and translated language.

Could you please help me on this? Thanks.

August 29, 2023 at 10:55 am #14306245

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

it seems to be a known issue.

Can you please check and try a workaround from next errata:

- https://wpml.org/errata/wpml-graphql-fails-to-fetch-single-custom-post-type-by-slug-based/

Regards,
Drazen

August 29, 2023 at 11:32 am #14306567

bjarteL

Hi,

Thanks for the reply. Unfortunately this workaround is not working.

I already have the same code in the functions.php as a solution of other issue: https://wpml.org/forums/topic/unable-to-query-a-post-by-slug-with-graphql-endpoint/

Thanks.

August 30, 2023 at 11:36 am #14312911

Nigel
Supporter

Timezone: Europe/Madrid (GMT+01:00)

Hi there

I've tested this out and I can confirm the problem, and also that the workaround for the related issue doesn't help in this case.

I've asked the developers of the GraphQL multilingual glue plugin for their feedback, as I'm not sure what the best way to handle this is.

I'll get back to you when I have some news.