Actions
Bug #102831
closedTyposcript deletion operator (>) deletes more than it should
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2024-01-13
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
When deleting a TS node, if a node with the same index as the parent of the deleted node exists at the same level as the deleted node, it is also deleted.
This will become clearer with an example:
page = PAGE page { 10 = COA 10 { 10 = TEXT 10.value = A 20 = TEXT 20.value = B 30 = TEXT 30.value = C } 20 = COA 20 { 10 = TEXT 10.value = 1 20 = TEXT 20.value = 2 30 = TEXT 30.value = 3 } } page.10.30 > page.20.30 >
-- Result: (in FE and in the BE Active Typoscrit module) --
page.10.30 and page.20.30 will be deleted but also page.10.10 and page.20.20
page = PAGE page { 10 = COA 10 { 20 = TEXT 20.value = B } 20 = COA 20 { 10 = TEXT 10.value = 1 } }
I must have missed something, but I've done a few tests and I can't figure out what $node->removeChildByName($previousIdentifierToken->getValue()); is for
in the function \TYPO3\CMS\Core\TypoScript\AST\AbstractAstBuilder::handleIdentifierUnsetLine
Actions