I have a (context-filtered, by nid) view that displays the fields of a field collection, with the first field (a term reference) set as a grouping field. It works fine when the view returns results. However if the view is empty (because there are no instances of the field collection created on the node), I get a white screen. The error logged is:Fatal error: __clone method called on non-object in /[path-to]/sites/all/modules/contrib/views/modules/field/views_handler_field_field.inc on line 663
If I group by a different field that is not in the field collection (e.g. the nid), the view runs fine.
Line 663 of views_handler_field_field.inc reads:
$entity = clone $values->_field_data[$this->field_alias]['entity'];
The variable $values->_field_data does not exist, which is the proximal source of the error. I haven't traced it back further than that.
Comments
Comment #1
willhowlett commentedQuite an old issue, but I am also experiencing this (when using https://drupal.org/project/views_aggregator to do the grouping)