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.
Calling entity_view('file', $files) returns data in the following format:
array (
'files' =>
array (
),
)
But the resulting array *should* be keyed by entity type, which is 'file', not 'files':
array (
'file' =>
array (
),
)
We need to implement the same solution as the view callback for nodes which converts the result to the proper array.
Comment | File | Size | Author |
---|---|---|---|
#1 | 2365821-fix-entity-view-result.patch | 1.12 KB | Dave Reid |
Comments
Comment #1
Dave ReidComment #2
Dave ReidCommitted #1 to 7.x-2.x.