I experienced an issue where default View components appear to be overridden at admin/structure/features, but experienced a PHP timeout when trying to view the specific diff of the component.
After looking into the issue, I saw that features_get_signature() was returning an empty signature for the default state of the component.
This happens because Features isn't actually including module.views_default.inc files.
The attached patch restores the default hash and makes the View show up as being default. This may be a separate issue from #1408338: View export showing as "FALSE" in diff, makes feature wrongly show as overridden, where the default state of the view is visible but the override shows the default Views export as FALSE.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 0001-fixed-1460522-foofeature.views_default.inc-not-inclu.patch | 1.9 KB | geek-merlin |
| features-include-views_defaults.patch | 792 bytes | ezra-g |
Comments
Comment #1
polI'm not able to test this patch but I think that's the way it should be.
Comment #2
moshe weitzman commentedLooks right to me as well.
Comment #3
mpotter commentedCommitted b4c34d1
Comment #4
mpotter commentedHmm, actually this isn't the correct way to handle this after all, and actually breaks with the latest version of Views. The specific check for 'views' was left over from D6. In D7 the "views_view" is provided via CTools. The problem was actually related to past problems with ctools_component_features_api that was returning the incorrect api version. Removing this for now and closing issue as "cannot reproduce". If you feel this is still a problem in the latest 7.x-1.x-dev version you can re-open it with more info on reproducing it.
Comment #5
mpotter commentedComment #6
geek-merlinI can reproduce this with today's dev of features, views and ctools:
* created and deployed feature with a view
* feature says "overidden"
* "defaults" in diff view only show "false"
(btw, the same problem is with entity_path exports)
hunted this down and noticed:
* views defaults are saved into foofeature.views_default.inc
* the include code in features_include_defaults() delegates inclusion to ctools_plugin_api_include() and does NOT include said file (for ctools-api-enabled mocules)
one solution would be to use the ctools api file schema for ctools-api-enabled modules BUT that would break existing features.
so for now we need inclusion of "features style" inclusion files too.
hacked that together in attached patch. tested and worksforme.
(i really wonder why this is unfixed for so long or if i am missing something relevant. =:-)
----------------------------------------------------------------------------------
additional info:
Comment #7
geek-merlinforget the patch, i'm just lacking sleep:
a simple
in myfeatures.module fixes the issue.