Environment
- TYPO3: 13.4.x
- b13/container: 3.2.3
- PHP: 8.4
Steps to reproduce
- On page A, create a new container content element
- Add at least one child content element inside the container
- Copy the container via the page module clipboard (same language) to page B
- On page B, add a new content element after the copied container
Expected result
The new content element is placed after the container.
Actual result
The new content element appears at the top of the column instead of after the container. Additionally, the TYPO3 upgrade wizard "EXT:container: Migrate 'container' sorting" is no longer marked as complete and must be re-run to restore correct sorting behaviour.
Background / Regression
This bug was fixed in v3.1.8 (PR #612) and v3.1.9 (PR #615, fixes #614) for the same-language copy scenario. Commit 72b79ce (released in v3.1.10, included in v3.2.x) refactored CommandMapPostProcessingHook.php by splitting localizeOrCopyToLanguage() into separate localizeChildren() and copyToLanguageChildren() methods. This refactoring appears to have reintroduced the sorting issue for same-language clipboard copies.
The fix shipped in v3.2.3 (PR #709, fixes #703) addresses a related problem (children disappearing on drag-and-drop copy) by rewriting simple DataHandler commands in CommandMapBeforeStartHook.php, but does not cover the sorting regression described here.
Affected files:
- Classes/Hooks/Datahandler/CommandMapPostProcessingHook.php
- Classes/Hooks/Datahandler/CommandMapBeforeStartHook.php
Environment
Steps to reproduce
Expected result
The new content element is placed after the container.
Actual result
The new content element appears at the top of the column instead of after the container. Additionally, the TYPO3 upgrade wizard "EXT:container: Migrate 'container' sorting" is no longer marked as complete and must be re-run to restore correct sorting behaviour.
Background / Regression
This bug was fixed in v3.1.8 (PR #612) and v3.1.9 (PR #615, fixes #614) for the same-language copy scenario. Commit 72b79ce (released in v3.1.10, included in v3.2.x) refactored CommandMapPostProcessingHook.php by splitting localizeOrCopyToLanguage() into separate localizeChildren() and copyToLanguageChildren() methods. This refactoring appears to have reintroduced the sorting issue for same-language clipboard copies.
The fix shipped in v3.2.3 (PR #709, fixes #703) addresses a related problem (children disappearing on drag-and-drop copy) by rewriting simple DataHandler commands in CommandMapBeforeStartHook.php, but does not cover the sorting regression described here.
Affected files: