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

bleen’s picture

Confirmed / subscribe

swentel’s picture

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

bleen’s picture

Status: Active » Closed (works as designed)

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

swentel’s picture

recidive’s picture

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

pfrenssen’s picture

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

kclarkson’s picture

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

a.milkovsky’s picture

Status: Closed (works as designed) » Active

I'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?

swentel’s picture

Status: Active » Closed (works as designed)

Because the status of view modes enabled or disabled is stored in a variable controlled by core, nothing that I can do about that.

a.milkovsky’s picture

deleted

diwant’s picture

Could we do things to that variable with Strongarm?

Chipie’s picture

Issue summary: View changes

Has anyone found a solution?

a.milkovsky’s picture

I think now it should work fine with the recent Drupal 7 and DS version

Chipie’s picture

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

dman’s picture

See #1315870: Feature export view modes not enabled

Add 'strongarm' as a requirement and it's taken care of there.