Actions
Bug #96427
closedRedirects module generates endless redirect loop ("Too many redirects") when renaming slug back and forth
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Miscellaneous
Target version:
-
Start date:
2021-12-22
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
In TYPO3 10.4.22 (but also ever since I've used the redirects module) there is a bug when you enable autoCreateRedirects
and rename slugs back and forth.
- Install TYPO3 v10 from scratch
- Add redirects:
composer req typo3/cms-redirects ^10.4
- Create a homepage and site configuration
- Add the following to your site configuration
config.yml
:
settings:
redirects:
autoCreateRedirects: true
- Create a page below the homepage and give it the slug "demo". Save.
- Change the slug to "demo2", a redirect will be created.
- Change the slug back to "demo" and the first redirect will now be a circular reference.
This is the resulting situation in the backend:
The culprit is the fact that as target
there is not a URL defined but a Typolink of the form t3://page?uid=2&_language=0
. This means that the "old" slug will always redirect to whatever the current slug is ... but it is the same after these operations, resulting in a "Too many redirects" error in the browser.
The entries in sys_redirects
look like this with the first line being the problematic one:
Files
Actions