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:

I'm getting a 404 for all the translated category pages.

Solution:

The Yoast plugin as an option to strip the /category/ base in the URL. It is set in Yoast SEO -> Search Appearance -> Taxonomy (tab) -> Category URLs (option at the bottom). It is currently set to 'Remove' on your site. This is a known issue that we have, and we have published an errata about it you can see it at the following link. https://wpml.org/errata/yoast-seo-strip-the-category-base-does-not-work-in-the-second-language/. So currently, you have two options to solve this problem. 1. Disable this option by setting it to 'Keep'. This solves the problem as I could see with your site's copy on my local server. 2. Disable that option in Yoast SEO plugin and use this plugin instead https://wordpress.org/plugins/no-category-base-wpml/

0% of people find this useful.

This topic contains 17 replies, has 2 voices.

Last updated by Itamar 12 months ago.

Assigned support staff: Itamar.

Author Posts
October 1, 2018 at 10:44 pm

elaineV

All pages translated to English on website return a 404 error.
Before it was the other way around (Portuguese pages returned 404, English ones worked).
I can't make them both work at the same time.

Example:
PT-br: hidden link
EN (404): hidden link

I tried every suggestion here in the forums and searching on Google but nothing worked.
I need help ASAP, please.

Thanks.

October 3, 2018 at 12:22 am #2783020

elaineV

Hi, I really need your help as this is impacting my branding.
I look forward to hearing from you soon.

Cheers

October 3, 2018 at 8:34 pm #2785714

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

I can see the issue on your site, but currently, it is the Portuguese page category page that is not showing and not the English page as you specified. Please see the attached screenshot por-404.jpg.
Can you please explain to me how do you make this issue switch between the languages?

Thanks,
Itamar.

October 3, 2018 at 11:51 pm #2785947

elaineV

Hi Itamar,

It changes when we update a category, for example:
- If we go to Posts - Categories - Inspire-se - Update

We look forward to a solution soon =)

Thank you

Elaine

October 4, 2018 at 7:02 pm #2788636

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Elian.

It seems like an issue with the Language Switcher and not with the actual page because when I go here hidden link I can see this English category page. Please see the attached screenshot. Please, try the troubleshooting section.

*** Please make a backup of your database before using this.***

Go to WPML -> Support -> Troubleshooting (link)
Once on the troubleshooting screen press the following buttons and check if it helps.
Press each button at a time and wait for the process to complete.
- 'Clear the cache in WPML'
- 'Remove ghost entries from the translation tables.'
- 'Fix element_type collation'
- 'Set language information.'

Does this solve the problem?

*** Please make a backup of your database before using this.***

Thanks,
Itamar.

October 5, 2018 at 9:04 pm #2791702

elaineV

It didn't work. And I don't think it's just the language switcher, because if you go directly to hidden link it doesn't work either

October 7, 2018 at 11:21 am #2793783

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi and thanks for trying my suggestions.

I can see that your site is hosted on the GoDaddy service. There are caching options activated by GoDaddy, so this might also be a caching issue.
Could please clear the cache from your site and see if the problem persists?
Please see the attached screenshot clear-cache.jpg
Please note that you might need to re-save the Get Inspired category and its translation and also might need to re-use the troubleshooting options that I've specified before.

**** Important! Please make a full site backup (files and DB) before you proceed with those steps****

Is it solving the problem on your site?

Regards,
Itamar.

October 7, 2018 at 4:46 pm #2794038

elaineV

Hi, we tried it all and did not work.
I really need to solve this ASAP.
Could you please login and check it out? We sent you in the first message the login info. This back and forth messages are delaying the process and it is impacting us.

Thanks.

Elaine

October 7, 2018 at 10:17 pm #2794363

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Elain.

I've changed the slug of the Portuguese INSPIRE-SE category (translation of GET INSPIRED in English) into 'get-inspired' and now it is working, and when you switch the Language Switcher, there is no 404. Please see the attached screenshots get-inspired-slug.jpg and no-404.jpg.

Can you please confirm that it is OK now?

Thanks,
Itamar.

October 7, 2018 at 11:09 pm #2794396

elaineV

Hi Itamar,

Yes, it worked for this category only. But this issue is also happening for other categories such as Tips and Also Destinations/Continents/Countries....

It is quite weird as I have this blog for 4 years and I always translated the slugs...Plus leaving the slugs in English it will probably be considered as duplicity for SEO and impact rank.

So I still need your help.

This error only happened when I updated WPML couple weeks ago.

Cheers.

Elaine

October 8, 2018 at 9:49 am #2795412

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Elaine.

You can still translate the slug for Portuguese. I've only inserted 'get-inspired' but you can insert the Portuguese slug. If 'inspire-se' does not work then could you please try it a little different? Maybe 'inspirese' without the dash (-).
Does it work this way?
Is it a good solution for you?

I've tried to replicate this issue on my test site and couldn't. I've translated a category, and I do not get a 404 page for the archive page of the category in the other language.

Here is what I suspect about the reason for this problem. I can see that the 'WPML Compatibility Test Tools' is installed on your site. You can also see the following admin message about it.
WPML Compatibility Test Tools is enabled but not effective. It requires WPML Translation Management plugin in order to work.
Is it possible that you had the Translation Management plugin installed and that you ran this plugin's options recently and this problem started after that?
I ask this because this plugin should never run on a production site, it is only intended for developing purposes. You can read more about this plugin in our documentation here.
https://wpml.org/2016/04/multilingual-tools-plugin/

I'll wait for your reply here, but meanwhile, I've also installed the DUplicator Pro plugin on your site and created a copy of it in case I'll need to debug the issue further.

Regards,
Itamar.

October 8, 2018 at 4:03 pm #2796842

elaineV

Hi Itamar,

I changed to inspiracao but the English version gives the 404 error.
Plus for the other categories I don't really have an option to translate the name of a country or continent in another way.

About the Translation Management we never had it.

October 9, 2018 at 10:48 am #2799550

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

OK, I've downloaded a copy of your site now and continue to debug this issue on my local server. I'll keep you updated here.

Thanks,
Itamar.

October 9, 2018 at 3:47 pm #2800927

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

I've debugged this issue on my local server and found out that the Yoast plugin is causing it. The Yoast plugin as an option to strip the /category/ base in the URL. It is set in Yoast SEO -> Search Appearance -> Taxonomy (tab) -> Category URLs (option at the bottom). It is currently set to 'Remove' on your site. Please see the attached screenshot. This is a known issue that we have, and we have published an errata about it you can see it at the following link. https://wpml.org/errata/yoast-seo-strip-the-category-base-does-not-work-in-the-second-language/. So currently, you have two options to solve this problem.
1. Disable this option by setting it to 'Keep'.
This solves the problem as I could see with your site's copy on my local server.
2. Disable that option in Yoast SEO plugin and use this plugin instead https://wordpress.org/plugins/no-category-base-wpml/

Please let me know if it is working for you.

Thanks,
Itamar.

October 17, 2018 at 11:37 am #2824427

elaineV

Perfect, thank you!!!
We have seen the link of this errata before but it is not updated, pls update it with the new print screen you sent me so it is easier for others to solve =)

Thank you again!!!

Cheers.