I'm using this with Drupal 7 beta 2 and Views 7.x-3.x-dev. When trying to save settings, I get an error message saying:
Notice: Undefined index: order in draggableviews_plugin_style_draggabletable->validate() (line 83 of views/draggableviews_plugin_style_draggabletable.inc).
I did some looking around and it seems $this->view->get_items('sort', $this->display->id); doesn't return the sort order if it is set to the default (ASC). I created a patch that does a check for this index and if not, sets sort to ASC so that index is available for validation.
I hope this helps and thank you for your work with this module.
Comment | File | Size | Author |
---|---|---|---|
#7 | draggableviews-order.patch | 1.14 KB | smk-ka |
#3 | repair_empty_default_sorting-967790-3.patch | 1.21 KB | Itangalo |
draggableviews_plugin_style_draggabletable.patch | 1009 bytes | cocoloco | |
Comments
Comment #1
cocoloco CreditAttribution: cocoloco commentedComment #2
cocoloco CreditAttribution: cocoloco commentedComment #3
Itangalo CreditAttribution: Itangalo commentedPatch rerolled against latest dev, and also to work against the module root directory.
Strangely, I still had some issues after applying this patch. (They disappeared after resaving the sort criteria – don't know if that's because of the patch or because of the save. Sorry.)
Comment #4
Itangalo CreditAttribution: Itangalo commentedNo, sorry, that was me being silly. The patch should work fine.
If someone else can confirm, I'd say that this issue could be set to "reviewed and tested by the community".
Comment #5
rv0 CreditAttribution: rv0 commentedhad some issues with latest dev (patch didn't apply + even without patch, it gave me WSOD on some pages)
so I applied it manually to the previous dev is was using, and this seems to work fine.
Comment #6
stred CreditAttribution: stred commentedsame for me: the patch didn't apply but the code fixed this issue.
Comment #7
smk-ka CreditAttribution: smk-ka commentedSlightly simplified patch, without explicitly setting the value of 'order'.
Comment #8
carl.brown CreditAttribution: carl.brown commentedI can confirm that the code in #7 gets rid of the notice on my install: D7.4, Views 7.x-3.0-rc1, DraggableViews 7.x-1.x-dev - however, I didn't try the patch file itself due to previous commenter's problems.
Oddly, I didn't get this notice on the first view I created with just one page display-type, but when I used exactly the same settings for a page display in another view which already had and entity content display type (from the EVA module), that's when the problems started. I'll have another play around at some point and update you if I find anything. Thanks for the patch!
Comment #9
steinmb CreditAttribution: steinmb commentedThe patch #7 applied cleanly. But I still get a list of warnings when saving a new sort order.
Dunno if these warning are related to this issue or not.
Comment #10
skilip CreditAttribution: skilip commentedPatch attached in #7 fixed the undefined index notification. This no-brainer should be committed IMHO.
@steinmb: AFAIK that's a separate issue.
Comment #11
steinmb CreditAttribution: steinmb commentedOK, then RTBC
Comment #12
ygerasimov CreditAttribution: ygerasimov commentedCommitted! thank you very much.