I'm getting this error when trying to preview my calendar:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_data_field_zone_ref.nid' in 'on clause'

and here is the join line from the query:

LEFT JOIN {node} node_field_data_field_zone_ref ON field_data_field_zone_ref.nid = node_field_data_field_zone_ref.nid

The field in question is a node reference relationship and the view is for a calendar, but since the relationship didn't involve dates or standard calendar aspects, it seemed more appropriate to post here. I need to filter my view on a field in the referenced nodes.

I'm listing this as a bug since it doesn't seem that the query builder should ever try to access an nid column in a field table, but if there is a config problem in how it gets set up, maybe not.

Comments

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

The field it uses is configured by the relationship handler itself. If you're using a nodereference then this would probably need to go against the references module.

I'm listing this as a bug since it doesn't seem that the query builder should ever try to access an nid column in a field table, but if there is a config problem in how it gets set up, maybe not.

I'm not sure why you think this, but that's simply not true. If the nid is where the relationship data is stored then that is what the query builder should be using. However in this case it's clearly not stored in the 'nid' field. But that is, as I said, configured by the relationship handler in the module providing the relationship.

I'll let you redirect this since you know more directly which module is providing the relationship.

drm’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

I suppose I was vague. The handler might need to use the nid as in field_data_field_zone_ref_nid - the value column. But field data tables don't have a column for nid itself. That is all I meant.

I'm setting this to won't fix here and will take it to the references issue page.