Project

General

Profile

Actions

Bug #96427

closed

Redirects module generates endless redirect loop ("Too many redirects") when renaming slug back and forth

Added by Jörn Wagner almost 3 years ago. Updated about 2 years ago.

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.

Steps to reproduce:
  1. Install TYPO3 v10 from scratch
  2. Add redirects: composer req typo3/cms-redirects ^10.4
  3. Create a homepage and site configuration
  4. Add the following to your site configuration config.yml:
settings:
redirects:
autoCreateRedirects: true
  1. Create a page below the homepage and give it the slug "demo". Save.
  2. Change the slug to "demo2", a redirect will be created.
  3. 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

typo3_redirects_bug.png (13 KB) typo3_redirects_bug.png Jörn Wagner, 2021-12-22 19:25
clipboard-202112222026-koo38.png (39.5 KB) clipboard-202112222026-koo38.png Jörn Wagner, 2021-12-22 19:26
Actions

Also available in: Atom PDF