this module is great but I don't understand why, when I initially open the sort nodes form for a specific term, all nodes are arbitrary ordered.
This brings to unwanted nodes order in Views if I don't manually order all (tens or hundreds) nodes in that taxonomy term.
I would expect only dragged and dropped nodes have the weight field value changed

Example

I open the sort nodes page for a specific term (/taxonomy/term/[tid]/order) and I see weights are all 0 valued (in db field they are 0 valued)

node		weight
node_A		0
node_B		0
node_C		0
node_X		0
node_Y		0

I drag&drop node X in fist position and node_C in last position something like this happens:

node		weight
node_X		-2
node_A		-1
node_B		0
node_C		1
node_Y		2

This is what I would like to see

node		weight
node_X		-1  (or any other value lower then 0)
node_A		0
node_B		0
node_Y		0
node_C		1 (or any other value greater then 0)

I understand this is almost impossible (what happens if, from initial all-0 situation, I swap Node_B and node_C?).
Anyway, if this is not possible, I would like to see the possibility to decide what initial order nodes have (alphabetical, creation date, change date , etc.)

Comments

realgiucas created an issue. See original summary.

davps’s picture

Assigned: Unassigned » davps
dieuwe’s picture

Just adding my thoughts to this request.

It's been a while since I actually looked at the code, but I think the weighting logic is handled by core, so either we'd have to look into overriding it and providing our own, or we'd have to look if there is anyway to tell it to allow duplicate values and only to update the items dragged.

Now... it could be that there is some code in the module that provides a bunch of initial values. If so that would be an easier fix.