Natural sort for view using field-collections gives SQL error

Created on 13 May 2014, about 11 years ago
Updated 31 July 2025, 4 days ago

Great module, which has made data output easier for me in many ways.

However, I've found a situation where it doesn't work. I have a database containing:
- node-type = restaurants (I'm using natural sort on the restaurant names)
- node-type = chef
- chef node includes a "recommendation" field-collection entity, which uses nodereference to xref to restaurant nodes

When I make a view of restaurant nodes, natural sort works fine.

When I make a view of recommendation field-collections for a particular chef, using a relationship to get the restaurant name:
- sorting by restaurant name using normal ascending works fine
- sorting by restaurant name using natural sort gives an SQL error:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= vns_node_field_data_field_recommendation_restaurant.eid AND (vns_node_field_da' at line 3

I imagine nobody's used the module in this context before... but here you are. I've attached the exported view, if it's of any use.

πŸ› Bug report
Status

Closed: outdated

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom adam_b

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024