[BUGFIX] Fix shortcut title generation in EditDocumentController
Since #96154, the shortcut button is invalid in case no `$displayName` is provided. For such case, the ButtonBar throws an unhandled exception. The EditDocumentController previously failed to ensure that the corresponding value is always properly set, which therefore led to mentioned exception in some cases. To fix this, it's now ensured that `getShortcutTitle()` does always return a valid title. In case something is wrong, e.g. no valid query arguments are provided, a default title is used. Previously, the `$recordId` in `getShortcutTitle()` was always directly casted to an int. However, since it is also possible to edit multiple records, the $recordId` might be a comma separated list of uids. This case is now also properly handled. Note: The `getShortcutTitle()` is since #94182 also used for the module title. This might be a misuse and will therefore be further evaluated in another patch. Resolves: #96337 Related: #96154 Releases: main Change-Id: I2ec6a5d2ab8d5263315e8fa7194bc887b084ae79 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72632 Tested-by:core-ci <typo3@b13.com> Tested-by:
Riccardo De Contardi <erredeco@gmail.com> Tested-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Oliver Bartsch <bo@cedev.de>
Showing
- typo3/sysext/backend/Classes/Controller/EditDocumentController.php 21 additions, 7 deletions...ext/backend/Classes/Controller/EditDocumentController.php
- typo3/sysext/core/Resources/Private/Language/locallang_core.xlf 9 additions, 0 deletions...sysext/core/Resources/Private/Language/locallang_core.xlf
Please register or sign in to comment