Project

General

Profile

Actions

Bug #56080

closed

Title field gets lost after using addToAllTCAtypes

Added by Dominik Weber about 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-02-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

When using \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes( 'sys_category' , 'tx_myfield' , '' , 'after:description' ); the standard title-field of the system category gets lost, because the 't' of the fieldname is being removed.

The bug seems to be the first line in TYPO3\CMS\Core\Utility\ExtensionManagementUtility::executePositionedStringInsertion (line 565). After replacing
"$list = $newList = trim($list, ', \\t\\n\\r\\0\\x0B');"
with
"$list = $newList = trim($list, ', \t\n\r\0\x0B');"
it's working again.

I don't think we need a double backslash at the second trim() parameter as you can see here: http://www.php.net/manual/fr/function.trim.php


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #55932: addToAllTCAtypes inserts string twiceClosed2014-02-12

Actions
Has duplicate TYPO3 Core - Bug #56283: TCA::addFieldsToPallette removes field from listClosed2014-02-25

Actions
Has duplicate TYPO3 Core - Bug #56342: ExtensionManagementUtility::executePositionedStringInsertion() cuts of some charactersClosed2014-02-26

Actions
Actions #1

Updated by Dominik Weber about 10 years ago

Update: it seems to that the "\\t" or "\t" in trim() removes the first character of the list.

Actions #3

Updated by Gerrit Code Review about 10 years ago

  • Status changed from New 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/27702

Actions #4

Updated by Markus Klein about 10 years ago

To clarify this. Correct is to use double quotes, but only single backslashes.

Reason: Escape sequences (like \t or \n) are only evaluated in double quoted strings.
(Except \' and \\ in single quoted strings, which escapes the single quote and the backslash there)
Using double backslash escapes the backslash hence the character afterwards is treated as normal character.

Actions #5

Updated by Gerrit Code Review about 10 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/27702

Actions #6

Updated by Gerrit Code Review about 10 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/27702

Actions #7

Updated by Gerrit Code Review about 10 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27702

Actions #8

Updated by Michiel Roos about 10 years ago

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

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF