I'm currently using Features Extra in Cash Flow and have found myself wanting to exclude a particular theme from the fe_block export. This is a theme internal to site that the Cash Flow Features modules come from, so it doesn't make sense to publish it publicly (plus, it will never revert properly like that).

So the title is what I'm hoping for — either that I can exclude it explicitly or that Features Extra will ignore it since no theme matches it. Given how status comparisons are done in Features, the first one would probably be easier.

The first one would also resolve the chicken-and-egg situation, which is that the exporting site with a custom theme will always show Overridden if I take the theme out (I'm just not re-exporting the feature for now). The importing site will show Overridden if I leave it in (I took it out manually because there will be way more "importing" (installing) sites).

Final question: Is there a hook I could use to change the behavior in the meantime?

Comments

wizonesolutions’s picture

I have found a sort of workaround for this. If you go into modulename.features.fe_block.inc and delete the lines that have to do with the custom theme, you can then use Features Override to export those settings separately. When the Features Override-produced module is enabled, both of them will show Default.

Works really well, actually. That's what I'm doing with Cash Flow currently.

pfrenssen’s picture

Nice that you found a workaround already :)

There are two issues here I think:

  • Settings for disabled themes are exported: I think that this is not intentional, why would you want to export settings for a theme that is not even used? This will probably be a straightforward fix.
  • Features containing block settings appear overridden if installed themes are not the same as the ones defined in the feature. I'm not sure if this can be solved easily. Different themes can have differing region layouts so exports for a theme cannot be applied to another theme. But I can imagine someone being only interested in block settings that are not theme-specific. Maybe we can do something with hook_COMPONENT_alter() to ignore the themes that are not enabled. On the other hand it could actually be desired to have the feature displayed as overridden when the themes do not match. I'd like to get some feedback from others on this.
wizonesolutions’s picture

What I'd like to see is the ability (maybe an Advanced section like Features Override has) that would let me simply disable exporting some of the themes, and preferably have features_exclude support for this so it wouldn't prompt me to do so the next time.

The site I'm having this problem on rightfully has the theme enabled, so it isn't a disabled-themes thing.

And I think that showing Overridden is correct; this needs to be solved at the export level.

Greg__’s picture

Issue summary: View changes

I'm having an similar issue.
I have a main theme which is installed on 30 sites but 10 of these sites have a subtheme for specific CSS.
So my exported blocks for the main theme don't work anymore on the subtheme because they don't use the "same" theme.

What I would like is to have the same block on everysite whatever if they have the main theme or a subtheme.

What do you think ?

(Up : Finally i decided to arrange my blocks with context)