Bug #100565
closedWrong format of link in sys_redirect.target may cause exceptions
100%
Description
I am not sure if this should be considered a bug. The entered link in sys_redirect.target was wrong.
Possible improvements:¶
- If the link entered in sys_redirects.target is wrong, display this with a warning (!) in the form
- better errror handling so that excption is not thrown, but log message is generated
Reproduce (1):¶
1. Create a redirect with sys_redirect.target=" t3://page=uid=18&_language=1 "
2. Save the record: exception will be displayed, but record is saved nonetheless.
The exception also occurs if the record already exists and:
- reference index is updated
- a filter is entered in redirects module which has this entry as result.
Error message¶
Update index of table sys_redirect ---------------------------------- 2554/6384 [▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░] 40% In ErrorHandler.php line 137: PHP Warning: Undefined array key "page=uid=18&_language=1" in /var/www/mysite/htdocs/typo3/sysext/core/Classes/LinkHandling/LinkService.php line 119
Versions¶
- TYPO3 11.5.26
- Composer installation
- PHP 8.1
Code¶
core/Classes/LinkHandling/LinkService.php
v11:
119 if (is_object($this->handlers[$type])) {
v12 (main):
if (isset($this->handlers[$type])) { $result = $this->handlers[$type]->resolveHandlerData($data); $result['type'] = $type; } else { throw new UnknownLinkHandlerException('LinkHandler for ' . $type . ' was not registered', 1460581769); }
Updated by Sybille Peters over 1 year ago
In TYPO3 v12 this is handled better: a flash message is displayed in the BE on saving.
Updated by Gerrit Code Review over 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78692
Updated by Gerrit Code Review over 1 year ago
Patch set 2 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78692
Updated by Oliver Bartsch over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 04e7c949088e632265eb04ec355fb34de7a2c7f9.