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 topic contains 6 replies, has 2 voices.

Last updated by Alejandro 3 months ago.

Assigned support staff: Alejandro.

Author Posts
July 11, 2019 at 2:58 pm #4191209

khalidA-27

Hi
All of my English categories have 404 error and not found
I don't know why

I didn't check it after you made the last settings change for duplicating products.
When I checked today I have this issue. I don't know what caused it.
I revered these settings back and still have the issue

I resaved permalink and nothing happened also.

Please help

July 11, 2019 at 3:28 pm #4191503

khalidA-27

HI
I resave English permalinks and works fine now. But I don't know what caused the issue. Any Idea how to know that?

July 11, 2019 at 3:41 pm #4191531

khalidA-27

Third update HAHAHA D:
When I resave English permalink, English categories works fine but Arabic ones have 404 error.
When I resave Arabic permalink to fix the issue happened, Arabic categories works fine but English ones have 404 error

July 11, 2019 at 5:03 pm #4192159

Alejandro
Supporter

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

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

Hello!

I think the problem was with the slugs, the category slug for the english and the arabic page should be different otherwise they end up throwing a 404 error.

Could you please flush your browser's cache and check again?

What i did was to add the suffix "ar" to the base priduct category in WooCommerce > WooCommerce Multilingual > Categories.

July 13, 2019 at 6:04 am #4202985

khalidA-27

Hi Alejandro
Thanks for reply

The problem was in an option of Rank Math plugin that strips category base "product-category" When I disabled this option it worked fine

Thanks

July 13, 2019 at 6:09 am #4202989

khalidA-27

Is there a way to strip category base other than this plugin because it causing issues as you see.
Normally category permalink is displayed like this; Ex: hidden link
I need it to be like this: hidden link
Shorter and nicer

July 15, 2019 at 11:32 am #4210505

Alejandro
Supporter

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

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

I searched through old forum tickets to see if we could find a solution for this problem. we do not really handle that part but several clients were using this plugin: https://wordpress.org/plugins/no-category-base-wpml/

So you could give it a try.

Please know, though, that this is a third party plugin so we can't support it, but it seems to work ok.

There is another solution for it which would be to just add the following in the "Product category" field in Settings > Permalinks:

./

(found in here: https://stackoverflow.com/questions/43447175/woocommerce-how-to-remove-product-product-category-from-urls )

But as you can see in this documentation, WooCommerce's Authors do not recommend you strip the category from the URL: https://docs.woocommerce.com/document/removing-product-product-category-or-shop-from-the-urls/

This is because if you then create a page or a post called "woman" with the same slug (for example), it will clash with the product category woman.

Both will look like this (in your case): hidden link and WordPress will return an error because of an endless loop.

With this in mind, though, you can always try to avoid same slugs on different post types, that way you can end up having it your way without issues!

The topic ‘[Closed] English Categories have 404 error’ is closed to new replies.