Hi,

I don't know if the bug will be easy to reproduce : using scs, I'm selecting two nodes, as the order they are displayed on the "sort" screen is ok, I validate, but the order in the final screen is wrong, the two nodes are inverted. If, on the "sort" screen, I move them, and set them in their original order, they are correctly sorted in the final screen...
I'll try to investigate further and keep you posted with debug elements when I can.

Regards,

Comments

simon georges’s picture

Hi,

I did a little digging : when you don't manually sort the nodes, the submission of the form renders every node with a weight of 0, so the asort($nodes) sort them by nid, whereas on the first screen they weren't sorted by nid.
Maybe the best way to solve this is to sort the node table by nid on the "sort" screen ?

Regards,

dtrdewaele’s picture

Nice work on this. I'll see what I can do to fix this asap.

dtrdewaele’s picture

Status: Active » Fixed

Fixed this in the development release of the module.
I added a counter to the code, so the default value of the weight isn't 0 anymore but 0, 1, 2, ...
Thx for digging.

simon georges’s picture

Hi,

I confirm this is fixed (at least on the test case I had) with release. 6.x-1.6.

Nice work !

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.