I have a custom view mode for a drupal commerce product display node type.
I get default view mode exported as a feature and installed correctly, but my custom view mode isn't being enabled in custom display settings by default when installing using my instal profile. And also it has some fields settings messed up.
To fix that, after installing the site, I need to go to manage display tab for the content type, enable my custom view mode. Go to it's tab, tweak the field display there. Saving my custom view mode will also have a side effect on the default view mode, so I have to go to that and tweak that too.
I'm trying to figure out how to work around this, as it's the only thing missing for releasing my distribution. It looks like all display settings data is stuffed in field_config_instance.data field. So for each field instance it stores it's display mode settings and build that when loading all fields instances for a bundle.
Comments
Comment #1
bleen commentedConfirmed / subscribe
Comment #2
swentel commentedThere is also 'field_bundle_settings' in the variables table which has the status of the view modes. I'm pretty sure that one will solve the problem with view modes not being enabled. The display data in field_config_instance stores the formatter settings of that field, regardless whether ds is installed or not. DS itself stores the place of a field in a layout.
Comment #3
bleen commentedIt's unfortunate that this setting is not broken up by content type ... but yes, swentel is correct that the location of this data is easily added to feature via strongarm.
Comment #4
swentel commentedBtw, there are 2 issues for this in features and drupal core
- #1137116: Export variables included in field_bundle_settings
- #1211008: Split field_bundle_settings out per bundle
Comment #5
recidive commentedOdd enough, adding this setting to my feature module via strongarm doesn't fix my problem.
I have to revert the feature to make it work as desired.
Maybe this is a problem with my install profile, any clues anyone?
Comment #6
pfrenssenThe patch in #1211008: Split field_bundle_settings out per bundle has gone RTBC and makes it possible to store these settings per content type in a feature using Strongarm.
Comment #7
kclarkson commentedI too am confirming that the patch in #1211008: Split field_bundle_settings out per bundle did not fix the issue of the "Full Node" view mode being enabled by default.
The positive side is that when I enable the "full node" view the settings are saved. Its just annoying to have to visit each content type and enable the full node view.
Comment #8
a.milkovskyI'va got the same issue. Exported DS view mode as feature not being enabled by default.
Why status of this issue is closed(works as designed)? Is it normal work od DS? Must view mode be disabled when it is exported by feature?
Comment #9
swentel commentedBecause the status of view modes enabled or disabled is stored in a variable controlled by core, nothing that I can do about that.
Comment #10
a.milkovskydeleted
Comment #11
diwant commentedCould we do things to that variable with Strongarm?
Comment #12
Chipie commentedHas anyone found a solution?
Comment #13
a.milkovskyI think now it should work fine with the recent Drupal 7 and DS version
Comment #14
Chipie commentedI have a recent D7 and DS version and the view mode is not enabled by default. In wich feature component are the enabled view modes exported?
Comment #15
dman commentedSee #1315870: Feature export view modes not enabled
Add 'strongarm' as a requirement and it's taken care of there.