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

joachim’s picture

EVA 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?

mkadin’s picture

Are you using the entity api? I'm not sure, but I think EVA should work if you are.

joachim’s picture

Status: Active » Fixed

> 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.