Bug #87612
closed
Content element sorting wrong when one element has sorting value of zero
Added by Helmut Hummel over 5 years ago.
Updated over 4 years ago.
Category:
DataHandler aka TCEmain
Description
When one content element has a sorting value of 0, pasting a new element on that column does not work correctly.
This can e.g. be triggered with gridelements (https://gitlab.com/coderscare/gridelements/issues/5)
Expectation: when one element has a sorting value of 0 and a new element should be inserted before this element, the element with value 0 should be included in re-numbering the sort values
Actual result: the element with sorting value of 0 will always be excluded from re-numbering, thus will always stay on top
- Status changed from New to Under Review
Actually, this can be reproduced without gridelements involved
- Create a new page
- Add 10 Elements to the page, by always adding the new elements before all already existing ones (always on top)
- Try to add an 11th Element on the top.
Expectation:
Element is added on the top
Actual result:
Element is inserted as second element
For a quicker test: Add one element and change the sorting value to 0 (which is what happens to the 10th element) and then try to add one element above the one that has sorting 0
The error also exists in a clean installation without any additional extension.
Your patch works too.
Can you speed it up somehow?
- Related to Bug #88051: Wrong CE order when copying pages with more than 10 CEs per column added
- Has duplicate Bug #88696: DataHandler getSortNumber use of increaseSortingOfFollowing wrong added
- Category set to DataHandler aka TCEmain
- Assignee set to Markus Klein
- Priority changed from Should have to Must have
- Complexity set to medium
- Is Regression set to Yes
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Under Review
- Status changed from Under Review to Resolved
- Status changed from Resolved to Closed
- Related to Bug #87531: Sort sub pages results in wrong page order added
Also available in: Atom
PDF