It appears that view modes and their configuration export fine through Features (2.x-dev) but the view modes are not actually registered when the feature is installed fresh (like in an install profile).

I searched up and down (and even tried the 2.x-dev + patch for EVM for Features) to no avail. In the end, I had to do this in the Feature module .install hook_enable that I made:

$entity_view_modes = array('node' => array('grid' => array('label' => 'Grid', 'custom settings' => TRUE), 'mini' => array('label' => 'Mini', 'custom settings' => TRUE)));
  $modes = variable_get('entity_view_modes', array());
  $modes = $modes + $entity_view_modes;
  variable_set('entity_view_modes', $entity_view_modes);

  // Clear the static entity info cache and rebuild the menu.
  entity_info_cache_clear();
  variable_set('menu_rebuild_needed', TRUE);

This made the View Modes available on the Manage Display screen of content types, and the view mode configuration was there and intact. Otherwise, the view modes would not show, requiring the user to 'recreate' it from the admin form.

Comments

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)

Features support hasn't actually been added to this module yet, so I'm not quite sure what you're referring to. I think we should merge this issue with #1425620: Features Module Support?

kevinquillen’s picture

Okay, that would explain it. It was disorienting because I could export bundle/field settings and see the view mode configs, but the modes themselves didn't export.

joachim’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

Looks like we can close this as a duplicate.