Project

General

Profile

Actions

Bug #102831

closed

Typoscript deletion operator (>) deletes more than it should

Added by David CADU 4 months ago. Updated 4 months ago.

Status:
Resolved
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


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #97816: New TypoScript parserClosed2022-06-27

Actions
Actions

Also available in: Atom PDF