Closed (fixed)
Project:
DraggableViews
Version:
7.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
10 Sep 2012 at 19:36 UTC
Updated:
3 Jul 2013 at 11:17 UTC
Jump to comment: Most recent file
Comments
Comment #1
Jason Dean commentedYep experiencing the same here...
Comment #2
mgiffordJust tagging.
Comment #3
istryker commentedChanging priority. This causes major accessibility issue.
Comment #4
istryker commentedThis problem was introduce in #1660508: 'New items appear bottom of the list' option fails in PostgreSQL because of COALESCE function
Patch attached.
Committed 91406b8.
This might reoccur if #1787764: Unknown column caused by orderby alias not matching field alias gets committed.
Comment #5
istryker commentedFor better values of the weights see issue #1901192: Row weight values range should be the same as what gets save to database
Comment #6
rongok commentedthe patch doesn't solve the issue. All the weights are still same after applying the patch.
Comment #7
istryker commented@rongok, after your comment, I went ahead did some more investigation.
One solve technical problem. If it is a new view (or a view with a new set of filter settings &
(x) Use all argumentsis selected), then all rows will be 'zero' as every row has a value of (2^31 - 1).Technically 'zero' is the lowest value in the range.
This is how it works currently
This will probably change with #1551230: Add pager support for DraggableViews tables, when it adds the complexity of a pager.
Comment #8
NaX commentedI think this same problem exists for the Field API handler version and this patch seems to only apply to the native handler. I think the Field API version should add the sort field as a normal field to the query and then read it back in the get() function.
Sorry, I don't know the views api well enough to provide a patch.
Comment #9
istryker commentedOk I will take a look at this. I did not think this would be broken, as its able to weight number from the field value. Maybe you have your view broken.
Comment #10
NaX commentedEverything works fine for me, except when I click "Show row weights". The drop-down select for every row defaults to the first option.
Comment #11
bcdev commentedI'm seeing the same behavior as NaX using the dev build I downloaded on 2/5/2013. Once you drag a couple items around and hit save, it will then save the order as expected. However, you still see all of the items with the same view order (see jpg).
Comment #12
istryker commented@web_junkie - the way you describe it, is what you should expect. You create a new view, and all the values are the same or are nulll/not set. They will all be the same [-(# of items)]. Once you click save, then they will all get a value.
I cannot recreate this problem with FieldAPI and the latest 7.x-2.x-dev
FYI - you sort by the weight. IE if you have a field called weight, then you sort by "Content: weight", not "Draggableviews: weight".
Comment #13
NaX commented@iStryker
When you tried to reproduce the problem did you click on "Show row weights" exposing the weights drop down and then trying to change the order using the drop down selects. Or is this a different problem and should have its own new issue.
Comment #14
istryker commentedThis is for showing the Row weights value correctly. @NaX if you try to sort using show weights and it does not work, then thats another issue.
Comment #15
NaX commented@iStryker, The problem I have is exactly the same as the original issue summary describes, but I think we are discussing two problems here.
Drag and drop ordering is working fine by its self, the problems exists when "Show weights" is clicked and the weight drop down selects are shown. One thing I can confirm is that the described problem is only 100% reproducible when you from a fresh page load do not use the drag and drop at all and then click "Show weights".
The first problem is that the drop down selects default to the first value as per the issue summary and web_junkie screen shot.
The second problem is that when you use the drop down selects to set values and click save the values are not used and all order field values are set to zero because the value used was NULL (unconfirmed). Where the zero/NULL comes from, I don't know.
@iStryker, please let me know how you would like to proceed with this going forward. Do you want us to open new issues? Is there something you need from me to help you reproduce, test or debug this. I tried to look into it myself but my Views API skills are were not good enough.
Comment #16
NaX commentedOk, I ran an experiment where I created to identical views the only difference besides page paths was the sort field being used. I got it sort of work in the one view and not working as per previous posts in the other. The only difference between the two fields from what I can tell is that the one was called 'field_order' or and the other used my usual naming convention "field_[node:type]_sort_order" in this case field_slideshow_sort_order.
I hope that helps.
Comment #18
DeFr commentedAdding a pointer here for those ending up on this issue when searching the issue queue, and that would be in the same situation as NaX: the problem with draggable views not showing correct weights with long-ish field names is tracked in #2005000: 'Show Weights' are broken with long field names.
Comment #19
NaX commented@DeFr, Thanks, that does seem to be my problem.