Bug #76029

Regex in ExtensionManagementUtility::executePositionedStringInsertion is broken if you want to insert after a palette

Added by Marco Huber over 3 years ago. Updated over 3 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-05-03
Due date:
% Done:

0%

TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('pages', 'myfield', '', 'after:description');

The field "description" is part of the palette "metatags" so $positionName in ExtensionManagementUtility::executePositionedStringInsertion() is "--palette--;;metatags". This is modified to "--palette--;[^;]*;metatags" and then escaped with "preg_quote($positionName, '/')". And then the preg_replace doesn't work.

$positionName should be first quoted and then extended.

This was intruduced in https://forge.typo3.org/issues/75830.


Related issues

Related to TYPO3 Core - Bug #75830: Better positionName extraction in ExtensionManagementUtility::executePositionedStringInsertion Closed 2016-04-21
Duplicates TYPO3 Core - Bug #75946: ExtensionManagementUtility won't insert fields in the right position if the position parameter is set Closed 2016-04-27

History

#1 Updated by Morton Jonuschat over 3 years ago

  • Status changed from New to Rejected

Closing as duplicate of #75946

Also available in: Atom PDF