Hi Guys,

I'm guessing this is a simple issue that I am missing, but I've spent 4 hours trying to create a feature and get the "Manage Display" settings to export as well.

I read the forums, the strongarm notes I could find, imported, exported, shouted, sighed and then tried this: http://www.chiefsplanet.com/BB/attachment.php?s=9a1a9b58a271654618fed19d...
All to no avail.

Here's the setup:

Without Strongarm:
Created a feature "Photo Gallery", with node type, image settings, menu link, photo_gallery_view.
Downloaded the feature and it works perfectly, except that display settings didn't export - so "Add Gallery Images" label displays above the images, etc.

With Strongarm:
Created same feature. Strongarm added in field_bundle_settings as per: http://drupal.org/node/1165798
This time however, when I got to "Add Content >> Photo Gallery", I only see the title field.

If I can get this sorted out, I'll write it up as a documentation page for features.

Thanks so much.

Comments

mpotter’s picture

True, but keep in mind that the field_bundle_settings variables also contain some other stuff that some people might not want to export. The normal Field exportables actually export the real "settings" of the display modes. The strongarm variable is only needed to enable the specific display modes. On my sites, I just use normal Field exports and then manually enable the display modes on the destination server. If you look in your FeatureName.features.field.inc file you should see the actual settings being exported.

markconroy’s picture

Hi mpotter,

Thanks for the reply, but it still doesn't answer my question. I have created a nice image gallery that is very simple to use. I wish to use this on a lot of my sites, but I don't want to have to play around with the display settings each time. Since features/strongarm can export them for me, I'd love to know how it is done.

Further, then, ideally, I'd like to contribute this module to drupal.org (as well as some other features that I have been working on), but it'd be unfair for others to have to enable these modules and then start setting display settings.

And then the big one: if I decide to go the whole way and create an installation profile/distribution using all these features, the thing will fall about if there are 10 different content types and 40 different display settings for people to have to tinker around with.

Again, though, thanks for the reply; it's much appreciated. This is wrecking my head.

mpotter’s picture

My suggestion would be to create a *.install file for your Feature export module that would handle enabling the correct view modes, rather than exporting the entire field_bundle_settings variables. Then when you enable the feature on your new site, the proper view modes get enabled.

Not much else we can do till D8 when the stuff in field_bundle_settings gets put into a proper place with the field data.

Enxebre’s picture

Hi,
I resolve a problem like this in the next way:

For extraffields:

drush vget field_bundle_settings_"your-entity-type"__"your-bundle"
Ex: field_bundle_settings_node__article

Then write in your profile.install a sentence like this:

variable_set(field_bundle_settings_"your entity type"__"your bundle", "the result from drush vget converted in a php array");

For fields:

Example:

$body_article = field_info_instance('node', 'body', 'article');
$body_article['display']['rss'] = array(
'label' => 'hidden',
'type' => 'text_default',
'settings' => array(),
'weight' => 0,
'module' => 'text',
);
field_update_instance($body_article);

Use it in the profile.install depending on your requirements

Regards.

kristofferwiklund’s picture

This has been fixed in Features 2.0 with the new {feature}.features.field_instance.inc

kristofferwiklund’s picture

Issue summary: View changes

didn't realise added images had to be local.