Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem: I am experiencing an issue where all product URLs in secondary languages are incorrect on my website leading to 404 errors in indexed URLs.

Solution:
- Navigate to WPML > Settings > Post Types Translation > Products.
- Check if the translations match the store URLs settings.
- If not, update the translations to align with the store URL settings and save the changes.

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.

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by Alejandro 1 year, 2 months ago.

Assisted by: Alejandro.

Author Posts
September 26, 2023 at 8:33 am #14464439

jaapd-2

Hi,

All of the product urls in secondary languages are incorrect.

For example on EN shop page: hidden link

All products have permalinks with primary langauge slug 'yoga-kleding' in it like:

hidden link

yoga-kleding has been translate to yoga-wear and yoga-kleidung in WPML store urls section.

I've re-saved permalinks, cleared cache but this didn't solve the issue.

Please help. This is an urgent matter as of now all indexed urls in EN and DE are generating 404's.

Cheers,
Jaap

September 27, 2023 at 7:50 am #14471043

jaapd-2

Hi,

I solved the issue by going to WPML --> settings --> Post Types Translation --> products. The translations were not correct over there (didn't match the store urls settings). I had to change them here and save.

Why does this happen? WPML seems rather unreliable when changing store urls.

September 27, 2023 at 8:55 am #14471819

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

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

Hello!

So the problem happens with the store slugs so instead of "products" you added something else.

You mention:

The translations were not correct over there (didn't match the store urls settings)

which store URLs settings are you talking about? i suppose you mean the ones in WooCommerce Multilingual, correct? if that's the case, it depends which one you modified.

Please watch this video which was done just a few minutes ago on a new site: hidden link

So could any of these scenarios be like yours? from what you mentioned, you had retranslated the content and retranslated the slug but it didn't take which might make my first video only phase 1 of what you did. in here you can see what happens when you change it again after you had it setup: hidden link

As you can see the slug returns to the original one if the original one changes after it had been translated and in the video i explain why, howeve i couldn't recreate yor situation and i suspect it does have to do with cache and even if you had flushed it, it's very likely you had to translate it again in order to make the change valid.

Regards.

September 28, 2023 at 8:35 am #14479735

jaapd-2

Hi Alejandro,

Thanks for the videos. What happened is what you show in your 2nd video at around 2:25.

I had changed the original product base slug. After that the secondary language slugs were not working and the original slug was used. I did solve that by going to WPML --> settings --> Post Types Translation --> products and I understand it also could be solved by going to string translator.

If I understood correctly this is something WPML is looking into to improve or fix this?

Cheers,
Jaap

September 28, 2023 at 9:19 am #14480123

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

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

we are working on streamlining and refining our workflows but you need to resave the slugs in all the languages in order to have it changed and that is not an error but how wordpress works (wordpress needs to know something changed in order to save it in the database).

Regards,