[BUGFIX] Set 'typoLinkParameter' array index for error handling
Set the array index `$linkDetails['typoLinkParameter']` in `\TYPO3\CMS\Redirects\Service\RedirectService` to pass it through. That information is needed for the LinkBuilder. For example, `DatabaseRecordLinkBuilder` would trigger an array key access error, in case the linked record cannot be found and no link can be generated. This array value is use there for the thrown exception message. The team play between `LinkService->resolve()` and the `LinkBuilder->build()` should be reviewed in a dedicated change. It may be useful, that the resolver directly adds this information to the result, making the manual adding at several placed through out the core obsolete. Comments are added to document this. Resolves: #100612 Releases: main, 11.5 Change-Id: I74cbf5cbb1b91e0045207873554aec4477986c4b Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78672 Tested-by:core-ci <typo3@b13.com> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Tested-b...
Showing
- typo3/sysext/core/Classes/LinkHandling/LegacyLinkNotationConverter.php 5 additions, 0 deletions...core/Classes/LinkHandling/LegacyLinkNotationConverter.php
- typo3/sysext/core/Classes/LinkHandling/LinkService.php 6 additions, 0 deletionstypo3/sysext/core/Classes/LinkHandling/LinkService.php
- typo3/sysext/redirects/Classes/Service/RedirectService.php 8 additions, 0 deletionstypo3/sysext/redirects/Classes/Service/RedirectService.php
- typo3/sysext/redirects/Tests/Unit/Service/RedirectServiceTest.php 1 addition, 0 deletions...sext/redirects/Tests/Unit/Service/RedirectServiceTest.php
Please register or sign in to comment