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 thread is resolved. Here is a description of the problem and solution.

Problem: Product category do not work properly when switching language. Some of them redirect to post pages, others return errors 404.

Solution: There are 2 separate issues: 1. For the category that redirects to a blog post, there is a 301 redirect. WPML does not create redirects so I'm not sure from where this comes from. I checked your .htaccess but there is nothing in there. In many cases, Yoast creates redirects but usually when it's deactivated they disappear. I'd suggest searching your Google console to see if you can find something there.

2. the problem might have been that some of the shop link were in German and others in English. To fix it, I did as follows: - went to Settings > Permalinks and deleted the Product category base permalink and saved. This reset the default permalink, in English - in WooCommerce > WooCommerce Multilingual > Store URLs I re-entered the German translation. Now you can see all links to categories are working fine in your staging site, so with these steps you should be fine on your production site too.

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by torbenT-2 2 months, 1 week ago.

Assigned support staff: Laura.

Author Posts
August 2, 2019 at 10:10 am

torbenT-2

Hello WPML Team,
my translated woocommerce product / product categories links worked, but now they do not work anymore.

Do you know how I can fix this?

So for example this link goes to a blog post? hidden link

And this one results in a 404 error: hidden link

Can you assist?

August 2, 2019 at 10:39 am
August 2, 2019 at 12:10 pm #4329801

torbenT-2

Hey Shekhar,
I have the staging environment ready now - and I have disabled all plugins except WPML and WooCommerce, saved the permalinks aganin but the issue is still there.

August 4, 2019 at 12:47 am #4335085

Laura
Supporter

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

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

Hi,

I'd like to take care of your ticket from now on.

I see there are some credentials, but they seem to be from your live site and not from the staging one, so I'll enable a private reply for that.

August 4, 2019 at 6:55 am
August 6, 2019 at 7:47 am #4344763

Laura
Supporter

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

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

Hi,

thanks for the staging site.

I checked it and the 2 issues are not related.

1. For the page hidden link there is a 301 redirect that points to the blog post. WPML does not create redirects so I'm not sure from where this comes from. I checked your .htaccess but there is nothing in there.
In many cases Yoast creates redirects but usually when it's deactivated they disappear.
I'd suggest searching your Google console to see if you can find something there.

2. about the other issue, the problem might have been that some of the shop link were in German and others in English. To fix it, I did as follows:
- went to Settings > Permalinks and deleted the Product category base permalink and saved. This reset the default permalink, in English
- in WooCommerce > WooCommerce Multilingual > Store URLs I rentered the German translation.
Now you can see all links to categories are working fine in your staging site, so with these steps you should be fine on your production site too.

Let me know if this helps you or if you need further assistance.

August 6, 2019 at 8:41 am #4345417

torbenT-2

My issue is resolved now. Thank you!