Needs review
Project:
DraggableViews
Version:
7.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 May 2016 at 09:57 UTC
Updated:
25 Nov 2017 at 22:08 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
trumanru commentedLooks like true. I've faced to same problem - random sorting with -dev version.
Comment #3
David_Rothstein commentedThere are two related problems here:
Both of these issues are a result of #2174287: Order not saved when using show row weights mode (although the second is more of a preexisting problem that never mattered much before that issue went in).
The two issues are very closely related, so here's a patch that fixes both at the same time. The fix is a bit complicated, but the details are explained in the code comments.
Comment #4
damienmckennaComment #5
David_Rothstein commentedNote: The above test failure looks like it's preexisting on the branch (see https://www.drupal.org/pift-ci-job/450761) and therefore not related to this patch. I also couldn't even reproduce it locally.
Comment #6
damienmckennaThis should resolve the test failure.
Comment #7
David_Rothstein commentedAh, that looks like a good fix - basically the problem is that the previous test was assuming clean URLs. (Still a preexisting test failure though, and not related to this issue, although obviously no harm in fixing it here.)
Comment #8
sgdev commentedI saw this references issue #2174287. @David_Rothstein, you mentioned the commit seems to have broken some things.
Is the issue specifically in situations where sorting is being done with both parent and child items? If I attempt to use the patch in #2174287 and have no hierarchy, it works as expected.
Comment #9
David_Rothstein commented@ron_s, yes, mainly when there are parents and children. But see point #2 in my above comment for a scenario where it can break even without a parent-child hierarchy.
Comment #10
sgdev commentedAh yes, I see. Thanks for pointing that out. I'm fairly certain I did not previously test that scenario.
Comment #11
sgdev commentedThe patch in #6 no longer applies cleanly since the test fixes have been committed elsewhere. They are already part of the current version of 7.x-2.x-dev.
Attached is an updated patch that removes the changes to
draggableviews.test.