Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Don't have steps to reproduce narrowed down yet, but:
- add Content: nid as a field, hidden
- enable aggregation on the view
- save the view and visit the page
The View I found this with has a couple of non-required reference fields on relationships, and exposed filters using those relationships.
Drupal\\views\\Plugin\\views\\field\\Field::createEntityForGroupBy() must implement interface Drupal\\Core\\Entity\\EntityInterface, null given, called in docroot/core/modules/views/src/Plugin/views/field/Field.php on line 809 and defined in docroot/core/modules/views/src/Plugin/views/field/Field.php on line 851
Comments
Comment #2
anruetherI am seeing the same error on different views each time I turn on Aggregation. In one view it gave me a white screen for the whole site on the other I could still access the Views Admin interface to turn aggregation off. I can give more details, but only next week.
Comment #3
anruetherSlightly different error message:
Comment #4
dawehnerI'm 200% sure this is a duplicate of an existing issue out there, but I cannot find it.
#2731433: Fatal error when using group by on views
#2715483: [regression] getEntity() doesn't always return entity, which results in add comment field not working in Views
#2319005: Notice: Undefined index: [field name] is thrown if relationship entities are missing
all also sounds like duplicates to this non findable issue.
Comment #6
Andre-Bclosed in favor of https://www.drupal.org/node/2799415 (with steps to reproduce, patch, and test suggestion - still some work left to be done there.)