When viewing custom entities, hook_entity_view_mode_alter doesn't fire because core triggers it for core entity types in each entity's build_content function (node_build_content, etc.). Seems to make sense to add this to entity_build_content.

Patch attached.

entity-add_view_mode_alter.patch686 bytestauno
PASSED: [[SimpleTest]]: [MySQL] 409 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more