I know, I need to give more info. What sorts of things do people need to see to help me figure out why my draggableview isn't saving? I drag, they change, I click save, they go back to the same order.

Screenshot of the view? Screenshot of the DV's settings?

Thank you.

CommentFileSizeAuthor
#5 changed_views_not_saving-283087-5.patch3.27 KBfxarte
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

plaverty’s picture

Ok, here's a little more info:

I have two content types, Slides and Slide Collection. The collection keeps node references to Slides. I want to show all slides for a given Slide Collection. I created a Page display.

So I set up a Relationship for Content: Slides.

I set the Argument to Node:Nid with the intent that I'd pass in a NID for the collection.

The Sort Criteria has DraggableViews: Order asc and nothing else.

My fields are:
DraggableViews: Order Order
Content: Slides Title (link)
(Slides) Node: Nid Nid
(Slides) Content: Image Title (link)
(Slides) Image: Image Image

The problem that comes in is when I view the Page Display, it all looks good, I have the handles and I have the dropdowns in the Order column. Except the dropdowns only contain a 0. When I inspect the dropdown, all of them have the exact same value:

Where that "199" is the nid of the collection and not the slide. I'm not sure what I'm doing wrong but clearly in the order field, I want that to be the nid of the slide, and I want those select fields to reflect the fact that I have multiple slides.

Any ideas of what I can look at?

Thank you.

TelFiRE’s picture

I have this same issue. I have tried 3 different D7 installs, following the instructions in the documentation. When you drag stuff, and then hit save, it just goes back to what it was.

This module doesn't work on vanilla install....

ShaunLaws’s picture

I had the same issue. I had caching set on the page display that creates the sorting page. I disabled caching on that display, flushed all caches and was then able to save the sort order.

TelFiRE’s picture

For me, caching is not enabled on that view and flushing caches does not solve the problem :(

fxarte’s picture

The problem seems to be on how the base field is determined in draggableviews.module, instead of using the base_field parameter from the view object, that information must be extracted from the field parameter:

::
function draggableviews_view_draggabletable_form_submit($vars) {
   $info = &$view->draggableviews_info;

   foreach ($view->result AS $i => $result) {
-    $nid = $result->{$view->base_field};
+    $nid = $result->{$view->field[$view->base_field]->field_alias};
::

Then also apply it to the function:

function draggableviews_view_draggabletable_form($form_state, $style_plugin) {}

and finally, in the file draggableviews.inc, to:

function _draggableviews_info($view, $info = NULL) {}

I believe this patch will help.
Patch tested with:

  • view with no relationship at all
  • a view with more that one relationship
  • A view with the case of the current issue, which was my original problem as well.

Hope this helps

iStryker’s picture

Category: support » bug
Status: Active » Needs review

Can someone test this and review this. I'm out of the loop for 6.x.

iStryker’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

Drupal 6.x is no longer supported. Closing issue.