Skip Navigation

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.

Our next available supporter will start replying to tickets in about 3.00 hours from now. Thank you for your understanding.

Tagged: 

This topic contains 23 replies, has 3 voices.

Last updated by Marcel 1 year, 5 months ago.

Assisted by: Marcel.

Author Posts
November 7, 2022 at 5:47 pm
November 7, 2022 at 6:14 pm #12402899

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Thanks,

If you click on any country in the categories, it will go to the page. And if you click in the Brazilian flag, to change the language, it will not swap

So you are talking about the Frontend, not the Backend. OK, that I was able to reproduce.

The issue is the permalink. If you try to open hidden link -> it will cause a 301 redirect to the default language. Yoast sets the 301 redirect, and then after comes a 302 redirect from WPML.

>>> <em><u>hidden link</u></em>

> --------------------------------------------
> 301 Moved Permanently
> --------------------------------------------

Status:	301 Moved Permanently
Code:	301
Server:	nginx
Date:	Mon, 07 Nov 2022 18:04:42 GMT
Content-Type:	text/html; charset=UTF-8
Connection:	close
X-Redirect-By:	Yoast SEO
Location:	<em><u>hidden link</u></em>

>>> <em><u>hidden link</u></em>

> --------------------------------------------
> 302 Found
> --------------------------------------------

Status:	302 Found
Code:	302
Server:	nginx
Date:	Mon, 07 Nov 2022 18:04:44 GMT
Content-Type:	text/html; charset=UTF-8
Connection:	close
X-Redirect-By:	WPML
Location:	<em><u>hidden link</u></em>

1) Make a full backup of your site

2) There is a configuration issue. I recommend you translate the URL Slug to lowercase. You can change that on hidden link below at "Translations of taxonomy Category labels and slug". Change it as best to /categorias and resave the WP permalinks.

That will change the permalink from /Categorias to /categorias or any other word you define there.

2) After that, Try to temporarily deactivate Yoast to see if that is causing the issue.

Best Regards
Marcel

November 7, 2022 at 6:54 pm #12403143

butterandflyB

Hi Marcel, I've tried all the steps you've mentioned, but so far, nothing has changed.

November 8, 2022 at 10:53 am #12409079

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

the redirect still happens:

>>> <em><u>hidden link</u></em>

> --------------------------------------------
> 301 Moved Permanently
> --------------------------------------------

Status:	301 Moved Permanently
Code:	301
Server:	nginx
Date:	Tue, 08 Nov 2022 10:49:57 GMT
Content-Type:	text/html; charset=UTF-8
Connection:	close
X-Redirect-By:	Yoast SEO
Location:	<em><u>hidden link</u></em>

>>> <em><u>hidden link</u></em>

> --------------------------------------------
> 302 Found
> --------------------------------------------

Status:	302 Found
Code:	302
Server:	nginx
Date:	Tue, 08 Nov 2022 10:49:58 GMT
Content-Type:	text/html; charset=UTF-8
Connection:	close
X-Redirect-By:	WPML
Location:	<em><u>hidden link</u></em>

Did you try to deactivate Yoast? As it shows, "X-Redirect-By: Yoast SEO". Please also see: https://wordpress.org/support/topic/yoast-causing-a-redirect-with-no-premium/ and https://wordpress.org/support/topic/yoast-seo-redirecting-without-premium-installed/#new-post. Could this be the issue?

Best Regards
Marcel

November 8, 2022 at 11:25 am #12409347

butterandflyB

Hi Marcel, I've deactivated yeast and the issue persists 🙁
I've also toggled the archives on yeast and the issue continues....

November 8, 2022 at 12:15 pm #12409821

butterandflyB

Hi Marcel, I've done a staging website and changed the theme, but the issue persists. I also, deleted the roast on the staging and same results.
I've also delete woocomerce, as there is a replicated categories word. Nothing has changed...
I have no idea on what's going on...

November 8, 2022 at 5:13 pm #12412919

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

please copy the URL from your staging without Yoast and add the link here hidden link to see the exact HTTP route. What is the result?

Best Regards
Marcel

November 8, 2022 at 6:28 pm #12413375

butterandflyB

>>> hidden link

> --------------------------------------------
> 200 OK
> --------------------------------------------

Status: 200 OK
Code: 200
Server: nginx
Date: Tue, 08 Nov 2022 18:27:26 GMT
Content-Type: text/html; charset=UTF-8
Connection: close
Vary: Accept-Encoding
X-Cache-Enabled: True
Cache-Control: max-age=172800
SG-Optimizer-Cache-Control: s-maxage=604800, max-age=60
Link: <hidden link;; rel="hidden link", <hidden link;; rel="alternate"; type="application/json", <hidden link;; rel=shortlink
Expires: Thu, 10 Nov 2022 18:27:25 GMT
X-Httpd: 1
Host-Header: 6b7412fb82ca5edfd0917e3957f05d89
X-Proxy-Cache: MISS
X-Proxy-Cache-Info: d NC:000000 UP:

November 8, 2022 at 6:29 pm #12413379

butterandflyB

Although the results says is fine, the issue persists on the staging and without the Yoast Plugin.

November 9, 2022 at 5:18 pm #12422933

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi,

please provide me with a duplicator copy from your site for local debugging: https://wpml.org/faq/provide-supporters-copy-site/

Best Regards
Marcel

November 10, 2022 at 11:51 am #12429207

butterandflyB

I've solved the issue. Since the beginning I thought it could be something related to WooCommerce and the word "category". For some reason, the plugin changed all the categories url and the products categories url.
1. I've disable all plugins, modified the site’s wp-config.php with define( 'WC_REMOVE_ALL_DATA', true ),
2. then I've deleted the WooCommerce plugin.
3. I also deleted all the strings from WooCommerce.
4. After that, I've purge the cache from WordPress.
5. Activate the WPML and Yoast again
After all this, the categories url when back to normal and are translating as it should.

November 10, 2022 at 6:29 pm #12433459

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Thanks for the info. I will close the ticket then.

Best Regards
Marcel

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.