Entity view function "scald_render_multiple" should return array keyed by entity type, and then another nested array keyed by entity id.
return array(
'scald_atom' => array(
12 => array(/*...render array for scald_atom with sid 12...*/),
13 => array(/*...render array for scald_atom with sid 13...*/),
14 => array(/*...render array for scald_atom with sid 14...*/),
),
);
I know that EntityAPIControllerInterface::view() is not telling you this, but have a look at EntityAPIController::view() of DrupalCommerceEntityController::view().
Scenario of one of possible bugs:
1. Create view for scald atoms.
2. Choose "Rendered entity" as format to show
3. Choose any format you like
4. See no results shown
See entity_views_plugin_row_entity_view::pre_render() and entity_views_plugin_row_entity_view::render() for more details about views integration bug.
Comment | File | Size | Author |
---|---|---|---|
#2 | scald_render_multiple-2424189.patch | 561 bytes | a.milkovsky |
Comments
Comment #1
a.milkovskyComment #2
a.milkovskyCreated the patch.
Please also mind https://www.drupal.org/node/2089865 issue that affects scald_render_multiple as well.
Comment #3
a.milkovskyComment #4
a.milkovskyComment #5
gifad CreditAttribution: gifad commentedHi,
What do you think of the approach at https://www.drupal.org/node/2396179 (patch #1) ?
This is the only one to make devel render ( /atom/###/devel/render ) working...
Don't know if that is significant (or even related) ...
Comment #6
a.milkovskyHI, gifad. I also had issue with Search API view.
Unfortunately I haven't found the issue you mentioned. I only searched issues about scald_render_multiple.
The solution you mentioned affects view_modes as well. But I am not sure if it is necessary to change view modes logic just for making entity views working.
Comment #7
fagoYep, that's the right format used by core and afaik only documented by entity_view() in entity module. I'd suggest following that also for improved interoperability :-)
Comment #8
fagoForgot to mention: Yes the patch looks good and solves the issue!
Comment #9
jcisio CreditAttribution: jcisio commentedCommitted and pushed. Thanks!