I've successfully made this module work on my site. The concept is to create a wishlist using the autocomplete text field (also using nodeconnect and noderefcreate to create new nodes on the fly). Node Reference allows you to drag and drop to change the order of the referenced nodes, but this doesn't seem to affect how the view is rendered at all.

I'm assuming this module is sending a comma-separated list of NIDs to Views to have them displayed, and the order of these (by default) should reflect the order of which the referenced nodes are listed. This doesn't work. By not assigning any sort criteria to my view, the list reflects the order of which they were originally created, but when I change the order around (using drag & drop in my node), the list doesn't change.

I've tried adding the content delta as a sort criteria, but it doesn't change anything. Any help is appreciated.

Comments

alphageekboy’s picture

Status: Active » Needs review
StatusFileSize
new862 bytes

I ran into the exact same issue. It appears to be an issue on line 74 of the node_reference_view_formatter.module file where it is using a "," instead of a "+" as plus is Or and makes sense to views while, is AND and doesn't make sense. I have attached a small patch that changes this to a "+". I added the multi-item argument to my sort, changed it to desc, and applied this patch. It works correctly in my case now.

Was:

74  $nids = implode(",", array_map(create_function('$v', ' return $v["nid"];'), $items));

Now:

74  $nids = implode("+", array_map(create_function('$v', ' return $v["nid"];'), $items));
jec006’s picture

It appears to me that sorting works as long as you use the multi argument order sort. This is provided by the views arguments extras module http://drupal.org/project/views_arguments_extras

That said, the connection should be + not , so the patch is also committed.

jec006’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.