Issue Bug Closed

#87612Content element sorting wrong when one element has sorting value of zero

Helmut Hummel 02/01/19, 12:41 updated 12/23/19, 22:48

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

Reviews 2

History 916

  1. Gerrit Code Review pushed patch set 1 for master to change 59604 status New Under Review 02/01/19, 13:13

  2. Helmut Hummel commented 02/01/19, 16:45

    Actually, this can be reproduced without gridelements involved

    1. Create a new page
    2. Add 10 Elements to the page, by always adding the new elements before all already existing ones (always on top)
    3. 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

  3. Georg Dümmler commented 03/18/19, 18:39

    The error also exists in a clean installation without any additional extension.

    Your patch works too.
    Can you speed it up somehow?

  4. Riccardo De Contardi changed Related to #88051 04/15/19, 12:47

  5. F Altrock changed Duplicated by #88696 07/08/19, 12:14

  6. Markus Klein changed category assigned to Markus Klein priority Should have Must have Complexity medium Is Regression 1 07/23/19, 11:06

  7. Gerrit Code Review pushed patch set 2 for master to change 59604 07/23/19, 11:12

  8. Gerrit Code Review pushed patch set 3 for master to change 59604 08/01/19, 11:20

  9. Gerrit Code Review pushed patch set 4 for master to change 59604 08/01/19, 11:37

  10. Gerrit Code Review pushed patch set 5 for master to change 59604 08/24/19, 16:57

  11. Helmut Hummel commented and changed status Under Review Resolved done 0 % 100 % 08/30/19, 09:30

    Applied in changeset commit:6717bd5f2032b21409340a3130647ba727507bd6.

  12. Gerrit Code Review pushed patch set 1 for 9.5 to change 61580 status Resolved Under Review 08/30/19, 09:39

  13. Gerrit Code Review pushed patch set 2 for 9.5 to change 61580 08/30/19, 09:53

  14. Helmut Hummel commented and changed status Under Review Resolved 08/30/19, 12:00

    Applied in changeset commit:362f8fc97b425e615af715937cfd6fe288ba4ede.

  15. Benni Mack changed status Resolved Closed 12/23/19, 22:48

  16. Markus Klein changed Related to #87531 03/13/20, 23:34