Bug #95716
closedTCA title with plain string crashes NewRecordController
100%
Description
Create a TCA for a table, that is not using a path to a language file (LLL:EXT:...) in ctrl/title, but instead a plain string:
$GLOBALS['TCA']['tx_example'] = [
'ctrl' => [
'title' => 'Bob',
...
],
...
If you now click the "Create new record" button in the list module, an exception will be thrown:
(1/1) TypeError
strtok() expects parameter 1 to be string, bool given
This is because in the NewRecordController, the following line assumes a string starting with "LLL:EXT:" and the substr function is returning false:
// Try to get localisation of extension title
$langFile = strtok(substr($title, 9 + strlen($_EXTKEY)), ':');
Updated by Oliver Hader about 3 years ago
- Status changed from New to Accepted
Introduced in https://forge.typo3.org/issues/95716, issue #94049
Updated by Oliver Hader about 3 years ago
- Related to Bug #94049: NewRecordController does not fetch group label from Extension Configuration when NOT using LLL labels added
Updated by Oliver Hader about 3 years ago
- Complexity changed from no-brainer to easy
Updated by Gerrit Code Review about 3 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/71934
Updated by Gerrit Code Review about 3 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/71934
Updated by Gerrit Code Review about 3 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/71934
Updated by Benni Mack about 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c22da2dbdc709143ace4f13856d40707fb0d7098.