Saltar navegación

[Resuelto] Cannot use integers (years) as taxonomy – archive displays too many redirects

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:

With WPML plugin, if you have a category that has a slug that consists entirely of numeric characters this can lead to a redirection loop.

For example, http://example.com/category/1234/ might do a 302 redirect to itself.

Solution:

It is a known issue, please try the hotfix of errata:
https://wpml.org/errata/numerical-category-slugs-can-possibly-lead-to-redirection-loop/

Relevant Documentation:

This support ticket is created hace 5 años, 10 meses. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Este tema contiene 7 respuestas, tiene 2 mensajes.

Última actualización por hannesU-2 hace 5 años, 10 meses.

Asistido por: Luo Yang.

Autor
Mensajes
#1232808

I am trying to:
display a custom taxonomy (year)

Link to a page where the issue can be seen:
enlace oculto

"erstellungsjahr" is the custom taxonomy.

I expected to see:
This Archive Page:
enlace oculto
but for 2016...

Instead, I got:
ERR_TOO_MANY_REDIRECTS

So. I think the problem is that 2018 or 2016 are integers... when i use a slug like _2018 everything works fine (see above link).

Can you help? _2016 would be a workaround, but i would prefer the it the other way.

Thanks and kind regards
Hannes

#1233153

Dear Hannes,

The problem you mentioned above is abnormal, please try these:

1) Deactivate all other plugins, and switch to wordpress default theme 2019, remove/deativate custom PHP codes.
Reset the WordPress rewrite rules, like this: Dashboard-> Settings-> Permalink, click "Save" button
And test again.

2) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/

#1234422

Hi Luo,
ok. Found the Plugin that is causing this error: WPML Multilingual CMS.
All works fine when this is deactivated.

But i really need this plugin 😉

#1234757

I have checked again in your website, both URLs shows 404 errors:
enlace oculto
enlace oculto

In WordPress custom taxonomy, the term's slug should be unique, I suggest you check it again:
See if there is existed term with slug "2016" in both languages: English and German.
For example, there is a term "2016" in English version of taxonomy "erstellungsjahr", in "German" version of taxonomy "erstellungsjahr", WPML plugin will setup another term _2016 to avoid the conflicts, you might consider to change the term slug as below:
en-2016
de-2016

#1234843

Dear Luo,
totally sorry - i changed the slug to jahr (year) so the new archive is here:
enlace oculto

I tried to call the german slug 2018 and the english slug en-2018.
The english version works fine than, but the german 2018 produces a too many redirects.

#1234853

Thanks for the details, I can duplicated the same problem in a fresh wordpress installation + latest version of WPML plugin and Toolset Types plugin.

And I have escalated this thread, will update here if there is anything news.

Currently, you will need to avoid to use pure numeric value in term's slug, use as you mentioned above: _2019 or de-2019

#1235365

Here is the feedback, it is a known issue, please try the hotfix of errata:
https://wpml.org/errata/numerical-category-slugs-can-possibly-lead-to-redirection-loop/

Test it and feedback if it is fixed.

#1235511

The fix worked. Issue is resolved. Thanks. Hope the fix will be implemented in the next wpml update!