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

Also available in: Atom PDF