#96421Redirects module picks "some" site when linking to target in overview
Description
The redirects overview page behaves weird. The module is out-of site context (it has no page tree and no page, and single redirect records are not assigned to a page, either).
Scenario:
- Create a simple redirect, set target to a content element (as with https://forge.typo3.org/issues/96101)
- Create a new top level page. This will trigger the ‘CreateSiteConfiguration’ hook, which creates a ‘autogenerated-xy’ entry in site.
- Delete that site again
-> When debugging typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php which has been changed with #96101, forceAbsoluteUrl is true.
This is because the site that is picked in this method is the now “dangling” autogenerated-xy entry that has been created for our new page.
In effect, the link generated for the redirect is broken – The ‘target’ has no information of the target site (?), so some broken link is generated in general for the existing redirect.
This seems to be a general problem that the linked target on the redirects overview page tends to pick a wrong target site, which leads to broken links.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch
- Commit message
-
[BUGFIX] Redirects module picks "some" site when linking to target in overview Resolves: #96421 Releases: main