Closed (fixed)
Project:
EVA: Entity Views Attachment
Version:
7.x-1.1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
17 Nov 2011 at 20:47 UTC
Updated:
14 Aug 2012 at 12:11 UTC
I've created 2 entities and I'm trying to attach EVA to one of them. It works in the preview view and also has an item in the Manage Display of the entity but nothing shows up when I actually load the item.
Is there something I should be putting in my code to make EVA display or are custom entities not supported?
Thanks!
Comments
Comment #1
joachim commentedEVA adds its fields to entity output using hook_entity_view_alter(). Looking at the code, it seems this is a bit of a hack to deal with problematic entities.
Maybe EVA needs to use hook_entity_view() as well, for the good entities?
Comment #2
mkadin commentedAre you using the entity api? I'm not sure, but I think EVA should work if you are.
Comment #3
joachim commented> Maybe EVA needs to use hook_entity_view() as well, for the good entities?
I'm clearly talking crack here :)
A custom entity should invoke both hook_entity_view() AND hook_entity_view_alter().
And I can confirm that with my custom entity (using EntityAPI), attaching an EVA works perfectly.