I have a nodereference field called "Action".

If I set the "Sort criteria" on "Action" for that field it is not sorted on the referencing node title, but on it's node id.
Which simply does not make sense.

Comments

catorghans’s picture

If I add this to class reference_facet in reference_facets.module

  function build_sort_query_field(&$query) {
    $query->add_orderby("n.title", 'ASC');
  }

Then it works for node references. Cannot oversee "user references".

edpaff’s picture

Facing the same problem on a 6.x install. Any ideas on how to sort the guided search block by title rather than NID for node reference fields?

The above code doesn't seem to work (although perhaps I'm not putting it in the correct place for the 6.x version?)...

Any help much appreciated.