Project

General

Profile

Actions

Bug #103806

closed

Renaming a page slug generates duplicate redirects

Added by Albrecht Köhnlein 7 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Link Handling & Redirect Handling
Start date:
2024-05-08
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If a default page suffix like "/" is configured in the Site configuration.

This is caused by the folling process:

  • The event listener TYPO3\CMS\Redirects\EventListener\AddPlainSlugReplacementSource generates a source by simply concatenating the base URL and the old slug slug, e.g. https://example.org/old-page-path
  • After that, a second source is generated by TYPO3\CMS\Redirects\EventListener\AddPageTypeZeroSource. Inside this class, the source is generated with TYPO3's routing and respects the page suffix. This results in https://example.org/old-page-path/
  • If both sources would be the same, the first one would be skipped. But because the are different, both are kept for further processing
  • As last step, a redirect for each source is created, which leads to the result from the screenshot

Files

redirects.png (52.7 KB) redirects.png Albrecht Köhnlein, 2024-05-08 13:06
Actions #1

Updated by Georg Ringer 7 months ago

  • Related to Bug #103436: Wrong creation of redirects added
Actions #2

Updated by Georg Ringer 7 months ago

IMO a duplicate of #103436?

Actions #3

Updated by Georg Ringer 7 months ago

  • Related to Bug #103798: Falsely created redirects when updating slug of expired page added
Actions #4

Updated by Albrecht Köhnlein 7 months ago

Georg Ringer wrote in #note-2:

IMO a duplicate of #103436?

Yes, maybe. Except the fact that #103436 says, this depends on hidden/starttime/endtime settings. In my observations, this happens with all renamed pages, depending on the default routing suffix.

Actions #5

Updated by Gerrit Code Review 6 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84228

Actions #6

Updated by Stefan Bürk 6 months ago

  • Assignee set to Stefan Bürk
  • Target version set to Candidate for patchlevel

IMO not a duplicate of #103436 or #103798 . Removing the relation now.

Provided a bugfix change for this issue along with a test case.

Actions #7

Updated by Stefan Bürk 6 months ago

  • Related to deleted (Bug #103436: Wrong creation of redirects)
Actions #8

Updated by Stefan Bürk 6 months ago

  • Related to deleted (Bug #103798: Falsely created redirects when updating slug of expired page)
Actions #9

Updated by Gerrit Code Review 6 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84228

Actions #10

Updated by Gerrit Code Review 6 months ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84205

Actions #11

Updated by Gerrit Code Review 6 months ago

Patch set 2 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84205

Actions #12

Updated by Stefan Bürk 6 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #13

Updated by Benni Mack 4 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF