[BUGFIX] Preserve container sorting after copying and moving - #1
Open
thegass wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Copying a container can leave its children with sorting values starting at 1. A subsequent paste after that container then targets a child above the container, causing the new element to jump toward the top of the page.
Reuse b13/container's sorting implementation and run it after inline copy relations have been remapped, after moves, and after relevant saves. Include newly created containers, clear the pending sorting queue before processing, and handle nested moves so descendants remain with their container. Reorder affected children even when their values exceed the parent's value, since unrelated records can still sit between them. The redundant b13 copy hook remains disabled.
Validation: 33 regression checkpoints passed using this repository's source in a TYPO3 13.4.35 / b13/container 4.1.0 application. Covered five consecutive copies, moves up and down, reversed child order on save, repeat saves, new inline containers, nested and multi-column containers, and connected localization across three runs (languages 0, 1 and 2). Checks used temporary database tables; the application-specific regression harness is not included in this repository.
git diff --checkpassed.