Passer au contenu Passer à la barre latérale

Ce sujet est résolu. Voici une description du problème et de la solution.

Problem:
After updating WooCommerce and switching to PHP 8.3, all Spanish category pages on the client's website are showing a 404 error, while other languages work fine.
Solution:
We recommend checking the slug settings under WPML → Permalinks. If the original setup used 'categorie-produit' for slugs, it's essential to maintain this structure consistently across all languages. Additionally, please review our recently published errata regarding issues with product category links not using translated slugs. You can find more details here: https://wpml.org/errata/product-category-links-do-not-use-translated-slugs/

If this solution does not resolve your issue or seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket for further assistance.

Il s'agit du forum d'assistance technique de WPML, le plug-in multilingue pour WordPress.

Il est accessible à tous, toutefois seuls les clients de WPML peuvent y publier leurs messages. L'équipe du WPML répond sur le forum 6 jours par semaine, 22 heures par jour.

Marqué : 

Ce sujet contient 9 réponses, a 0 voix.

Dernière mise à jour par stephaneG-21 Il y a 2 jours et 13 heures.

Assisté par: Bruno Kos.

Auteur Messages
juillet 17, 2025 à 10:49 am #17245177

stephaneG-21

Contexte de la question:
My website crashed following a WooCommerce update. I fixed the crash by updating to PHP 8.3, after that I noticed issue with the Spanish category pages.

Symptômes:
I have a 404 page for all my categories in Spanish, but not in the other languages.

Questions:
Why am I getting a 404 error on my Spanish category pages?
How can I fix the 404 error on my Spanish category pages?

juillet 17, 2025 à 2:52 pm #17246773

Bruno Kos
Partisan de WPML depuis 12/2018

Les langues: Anglais (English ) Allemand (Deutsch ) Français (Français )

Fuseau horaire: Europe/Zagreb (GMT+02:00)

Hi,

Can you check this?
https://wpml.org/forums/topic/new-update-messes-up-category-language-switching/#post-17233314

If you translate these singular and plural items as well, do categories work now?

juillet 17, 2025 à 3:37 pm #17247010

stephaneG-21

Hi Bruno,

The plural is already translated as you can see on the print screen nº1.

I see that the default language for the taxonomie is english, not french as for the other parts (see print2). Can the problem comes from that ?

Thanks
Karine

print2.jpg
print1.jpg
juillet 18, 2025 à 6:14 am #17248690

Bruno Kos
Partisan de WPML depuis 12/2018

Les langues: Anglais (English ) Allemand (Deutsch ) Français (Français )

Fuseau horaire: Europe/Zagreb (GMT+02:00)

What if you translate Product category base, category slug, resave permalinks and clear the cache, does it work then?

this.jpg
base.jpg
juillet 18, 2025 à 8:56 am #17249107

stephaneG-21

If I do that it won't change my urls and SEO ?

juillet 18, 2025 à 10:10 am #17249482

Bruno Kos
Partisan de WPML depuis 12/2018

Les langues: Anglais (English ) Allemand (Deutsch ) Français (Français )

Fuseau horaire: Europe/Zagreb (GMT+02:00)

It would, but you can simply copy-paste them as they were before or how these are set in the original language, so that no SEO is affected.

juillet 18, 2025 à 10:36 am #17249594

stephaneG-21

My url categories are like that :

lien caché
lien caché
lien caché
etc

So there is no relation with what appears in the taxonomie slug (see printscreen). I am very afraid to break all my SEO work if I change something here.

Do I have to write "categorie-produit" for all the slugs?
If yes how can I change the english slug? I have no access to change it.

print1.jpg
juillet 18, 2025 à 3:07 pm #17251239

Bruno Kos
Partisan de WPML depuis 12/2018

Les langues: Anglais (English ) Allemand (Deutsch ) Français (Français )

Fuseau horaire: Europe/Zagreb (GMT+02:00)

The slug in the original language (which WPML typically stores as English by default, even if your site doesn't use English) is set under WPML → Permalinks.

Regarding your question: "Do I have to write 'categorie-produit' for all the slugs?" — yes, if your original setup used that structure, then you'll need to include it consistently.

Also, could you please check this newly published errata? We just released an update on this issue:
https://wpml.org/errata/product-category-links-do-not-use-translated-slugs/

juillet 21, 2025 à 7:56 am #17253970

stephaneG-21

I think that I identified the source of the problem but I don't know how to fix it.

I realized that I was not looking in the correct part, I was in "categories" and not in "product categories"

Now I can see in "product categories" that the slugs are not translating except for spanish (see attached). As you can see it is written "categoria-producto" and not "categorie-produit" as I want but it doesn't let me change the translation.

How can I change it?

print3.jpg
juillet 21, 2025 à 11:25 am #17255218

Bruno Kos
Partisan de WPML depuis 12/2018

Les langues: Anglais (English ) Allemand (Deutsch ) Français (Français )

Fuseau horaire: Europe/Zagreb (GMT+02:00)

Could you try filling in all the fields and then click "Enregistrer"? We need all of them completed for this to work, even if the singular and plural entries are just copy-pasted.

After that, please click the synchronization button below. Does it work?

all of them.jpg
juillet 21, 2025 à 11:31 am #17255245

stephaneG-21

Great it works.

Thank you very much for your help!