Problem with custom view modes and features

When i revert my feature containing the DS view modes and configuration someting strange happens:

1) View modes are created but not active for the content types i used them for
2) When i activate them manuel for the content type (Use custom display settings for the following view modes ), drupal knows my settings and everything is like i wanted

Am i forgetting someting in my feature, working in team with clean installs so i need to get this right

Thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

michiellucas’s picture

swentel’s picture

Status: Active » Closed (works as designed)

View modes are configured through a variable called 'field_bundle_settings' - that's core handling it, so you need to export that variable as well.

msbrar’s picture

Were you able to achieve this. Although i did export field_bundle_settings and i see the settings in the include file, i can still not see them in the site. Somehow, the settings seem to be overriden.

EDIT: This worked for me with the solution described by clearing the caches.

hedley’s picture

A great feature would be to be able to export the view mode settings per content type

Cyclodex’s picture

I also have this problem after exporting and importing the whole database. Strange that the displays are not activated. Looks like I have to enable them again.
But why are they not on after complete copy of database? Isn't that saved in the DB ?

Regards

Elijah Lynn’s picture

This is working now in case anyone comes across this. You do have to clear cache to get it to work though as suggested above. I tried field_bundle_settings_user__user to get my active view modes exported but it didn't work. Then spent a few hours on different variables and finally came across this and gave it another go with a drush cc all (cache clear). Works great now!

Cyclodex’s picture

Then this would be cool if this information could be shown somewhere or a dependency could be set. I am not sure what is possible in features, but wanted to note it down here for now. Will also test this the next time I need this. Thanks so far.

Cyclodex’s picture

Issue summary: View changes

Screenshot won't upload so i added info text

dman’s picture

Issue summary: View changes

If not clear for searchers (like me) - the solution is to add strongarm.module
With that on, the additional (core) settings needed are autodetected and become part of your feature.

For a 'news' content type, these additional settings became available from core:

 field_bundle_settings_node__news  menu_options_news  menu_parent_news  node_options_news  node_preview_news  node_submitted_news

The first one was the key for getting enabled 'view_modes' to deploy.

Nikhil Banait’s picture

#8 worked for me. Thanks.