Project

General

Profile

Actions

Bug #95716

closed

TCA title with plain string crashes NewRecordController

Added by Christian Eßl over 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Start date:
2021-10-20
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Yes
Sprint Focus:

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)), ':');

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #94049: NewRecordController does not fetch group label from Extension Configuration when NOT using LLL labelsClosed2021-05-04

Actions
Actions #1

Updated by Oliver Hader over 2 years ago

  • Status changed from New to Accepted
Actions #2

Updated by Oliver Hader over 2 years ago

  • Related to Bug #94049: NewRecordController does not fetch group label from Extension Configuration when NOT using LLL labels added
Actions #3

Updated by Oliver Hader over 2 years ago

  • Complexity changed from no-brainer to easy
Actions #4

Updated by Gerrit Code Review over 2 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

Actions #5

Updated by Gerrit Code Review over 2 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

Actions #6

Updated by Gerrit Code Review over 2 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

Actions #7

Updated by Benni Mack over 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF