2

I've set up a Drupal 7.18 site with Views 7.x.35. I've created a content type "Course" and included it's content type as an entity reference in a "Product" content type.

I have a view for listing courses and it sorts alphabetically just fine. However, I have another view products, with a course column, and its alphabetical sort is not alphabetical. I would like advice on 1) why this is so and 2) how to make it alphabetical.

Things I've tried: * Clearing caches via Admin section * Removing all other sort criteria from view * Removing and re-adding the field

I am attaching an image depicting the behavior and another showing the view setup. I'm happy to provide more detail as appropriate. TIA!

Here's links to the photos (sigh, first post, lack 10 points to post images) Error behavior: http://www.flickr.com/photos/24745111@N00/8389442182/in/photostream

View admin pane: http://www.flickr.com/photos/24745111@N00/8389442184/in/photostream

  • Since the course field is an entity reference the sort would be working on the node id and not the node name. can you check this. – Mohammed Shameem Jan 17 '13 at 10:33
2

Since the course field is an entity reference the sort would be working on the node id and not the node name. can you check this.

What you could do is add the node title instead of the node entity field. and create a relationship to the node title to the entity reference field. Now the sort should work properly.

EDIT : Adding the steps mentioned in comment

  1. Add Content:Title to the view.
  2. Go to advanced, add a relationship to the content type.
  3. Go back to that title field configuration and select the relationship from the drop down.
  4. Go the the format settings and make the new field sortable.
  • Thank you so much! For newbs like me: 1. Add Content:Title to the view. 2. Go to advanced, add a relationship to the content type. 3. Go back to that title field configuration and select the relationship from the drop down. 4. Go the the format settings and make the new field sortable. Thank you! – Rod Gammon Jan 17 '13 at 22:23
  • Consider selecting this answer as correct? – David Meister Jan 19 '13 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.