Project

General

Profile

Actions

Bug #92748

open

Infinite redirects (redirect loop) when updating slugs

Added by Michal Cygankiewicz over 3 years ago. Updated over 2 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2020-11-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
redirects, redirect loop
Complexity:
Is Regression:
Sprint Focus:

Description

When backend user change slug of a page then there are sys_redirects that are created automatically. Following scenario will lead to whole part of page tree be inaccessible for visitors:

1. Page is called "Subpage" (slug: /subpage)
2. Page is beeing renamed to "Subpage something" and slug get's updated to "/subpage-something" at the same time redirect 307 is created (/subpage -> /subpage-something)
3. Page is beeing renamed to "Subpage" and slug get's updated to "/subpage" at the same time redirect 307 is created (/subpage-something -> /subpage)

After step 3 is done - infinite redirect has been created so subpage and all it's child pages are inaccessible at all due to infinite redirect.

We already had such a case with our redactors several times. Did anyone experienced similar problems and how you deal with that? Of course automatic redirects creation might be switched off by configuration but after all it's nice functionality - but could be quite dangerous at current state.


Related issues 6 (2 open4 closed)

Related to TYPO3 Core - Feature #93288: Merge redirect chainsClosed2021-01-14

Actions
Related to TYPO3 Core - Bug #89090: No redirect loop prevention for slugs / redirectsClosed2019-09-05

Actions
Related to TYPO3 Core - Bug #89327: Auto redirect: Could not resolve target pageClosedFrank Nägler2019-10-01

Actions
Related to TYPO3 Core - Bug #95650: redirects:checkintegrity will falsely show redirect as conflict (if source_path=slug in translated page)Closed2021-10-14

Actions
Related to TYPO3 Core - Bug #92448: changing slug again after reverting an auto update causes wrong URLs on sub pagesNew2020-09-30

Actions
Related to TYPO3 Core - Task #89301: Streamline automatic slug & redirects handlingAccepted2019-09-29

Actions
Actions #1

Updated by Riccardo De Contardi over 3 years ago

  • Category set to Link Handling, Site Handling & Routing
Actions #2

Updated by David Bruchmann over 3 years ago

Actions #3

Updated by Sybille Peters about 3 years ago

I already reported this a while ago: #89090. The issue has been closed as resolved, see https://review.typo3.org/c/Packages/TYPO3.CMS/+/61627

Was added in 10.1, see changelog: https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/10.1/Feature-89090-ReportsForConflictingRedirects.html

The patch does not really resolve the issue - meaning it does not prevent redirect loops. However it does provide some tools:

What you can do is use the commands redirect:checkintegrity and / or redirects:cleanup regularly to check theredirects and cleanup old redirects periodically (e.g. using the hit count or age of the redirect):

run:
typo3/sysext/core/bin/typo3

(I have not tested this yet).

Actions #4

Updated by Sybille Peters about 3 years ago

  • Subject changed from Infinite redirects when updating slugs to Infinite redirects (redirect loop) when updating slugs
  • Tags set to redirects, redirect loop
Actions #5

Updated by Sybille Peters about 3 years ago

  • Related to Bug #89090: No redirect loop prevention for slugs / redirects added
Actions #6

Updated by Sybille Peters about 3 years ago

@Wolfgang Podbregar Klinger After only about a week after updating to v10, redirect chaos has already rendered a page unavailable (redirect loops). This had to be manually resolved by an admin by removing unncessary redirects. It happened because URLs of pages including subpages were changed several times.

I had already anticipated problems with the automatic renaming of URLs (on subpages) and automatic redirect creation. I am afraid it is a real challenge to prevent editors from pointless multiple changes of URLs (which may be well intended but create problems). Will checkout sluggi extension.

I am not really happy with this. Wanted to stick to core solution.

Actions #7

Updated by Sybille Peters about 3 years ago

  • Related to Bug #89327: Auto redirect: Could not resolve target page added
Actions #8

Updated by Sybille Peters over 2 years ago

You can use redirects:checkintegrity to find redirect loops.

I noticed, that it reports some problems with redirects which are false positives. Due to this, I find it difficult to work with this report.

I created an issue for that problem and a patch, would be great if someone could help with reviewing and testing:

Actions #9

Updated by Sybille Peters over 2 years ago

  • Related to Bug #95650: redirects:checkintegrity will falsely show redirect as conflict (if source_path=slug in translated page) added
Actions #10

Updated by Markus Klein 6 months ago

  • Related to Bug #92448: changing slug again after reverting an auto update causes wrong URLs on sub pages added
Actions #11

Updated by Markus Klein 6 months ago

  • Related to Task #89301: Streamline automatic slug & redirects handling added
Actions

Also available in: Atom PDF