Hi,
At some point between 7.x-2.x+dev-26 and 7.x-2.x+56, on line 19 of draggableviews.module, the condition changed from:
if (isset($form['draggableviews']) && !empty($form['draggableviews'])) {
to...
if (!isset($form['draggableviews']) || empty($form['draggableviews'])) {
I'm not sure of the reason for this change, but it's causing other forms that might appear on the View to lose their submit button. Specifically this is affecting a View that has both draggableviews and views_bulk_operations enabled. The VBO confirmation form does not have it's "Confirm" button because the condition above causes it's #access to be set to false.
I'm not submitting a patch because all I would do is revert the condition back to the way it was in 7.x-2.x+dev-26, but there might be a very good reason why it changed from && to ||.
Any thoughts?
Comment | File | Size | Author |
---|---|---|---|
#12 | work_with_VBO-2013839-12.patch | 4.62 KB | iStryker |
Comments
Comment #1
JonMcL CreditAttribution: JonMcL commentedActually, things get worse on further investigation :(
It seems that draggableviews_form_alter is also changing VBO's "Confirm" button to the draggableviews save_button_label option value. It's also overriding VBO's submit button function with it's own (draggableviews_views_submit). I'm fairly confident that wasn't happening with 7.x-2.x+dev-26.
Maybe just add:
as the first line of the draggableviews_form_alter function?
Comment #2
sinasalek CreditAttribution: sinasalek commentedPutting the line mentioned by @JonMcL fixed the problem for me, not side effects spotted
Comment #3
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedi can't seem to get past this.
I have vbo and draggable enabled.
I can sort in one view
it says that it is saved
when I do a browser refresh the view returns to it's old order.
Comment #4
philipz CreditAttribution: philipz commentedIs your view ordered by Field API or native handler? Is the field or native handler weight added to view's sorting as its first element?
Comment #5
SocialNicheGuru CreditAttribution: SocialNicheGuru commentednative.
it is. I removed all other sort criteria.
while I can move the fields in the table and it says it is saved, a refresh undoes it all.
Comment #6
philipz CreditAttribution: philipz commentedThere is sometimes a problem with arguments if you have any exposed filters on the view. I've noticed on some of my views that I needed to set "Do not use any arguments" on the Draggableviews: Weight settings. Also I'm not sure but you might try removing exposed filters if you have any and then check if it works.
Comment #7
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedall of my fields have a field reference.
I defined a reference in my view
so the title is (field_reference)title
Do I need to do the same for the draggable sort and content fields in my control view so that:
(field_referenence)draggable_sort in the sort section
(field_reference)draggable_content in the fields section
Comment #8
philipz CreditAttribution: philipz commentedSounds like you have some advanced setup. You should open separate issue for it and describe your setup in detail.
Comment #9
iStryker CreditAttribution: iStryker commentedI think patch #2 of https://www.drupal.org/node/2314575#comment-9573367, might solve this
#2314575: Notice: Undefined offset: 0 in draggableviews_form_alter()
Patch changes
Comment #10
iStryker CreditAttribution: iStryker commentedNevermind #9 doesn't work. Draggableviews disables and hides its save button when the results are empty. It needs this. #2 only works because draggableviews_post_render hides the save button.
I'll work on a patch later today for this, I think I have an idea.
Changing title and marking as feature request. VBO use the same form as Draggableviews. Conflicts are bound to happen. I am surprise there is not more.
Comment #11
iStryker CreditAttribution: iStryker commentedAlright I think I got it. Stole a lot of things VBO did in its hook_form_alter() and replace them in DV hook_form_alter().
Summary of Patch
Patch is against the latest dev.
Comment #12
iStryker CreditAttribution: iStryker commentedNew patch. Next button does not work #1914890: Next button missing in modify values action (VBO). Fixed in new patch.
Comment #13
iStryker CreditAttribution: iStryker commentedWant to get this into 7.x-2.2. Adding Parent
Comment #14
thomas.lobjoie CreditAttribution: thomas.lobjoie commented#12 works fine... thanks!
Comment #15
pfrillingThe patch in #12 is also working for me.
Comment #17
iStryker CreditAttribution: iStryker commentedAwesome, committed.