Closed (duplicate)
Project:
Features
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 Jun 2011 at 15:33 UTC
Updated:
23 Aug 2012 at 21:19 UTC
I think we have some legacy views code still left in features_include_defaults(). After a quick look, here are some code that I think can be stripped down:
// Build an array of components that require inclusion:
// Views, CTools components and those using FEATURES_DEFAULTS_INCLUDED.
if (!isset($include_components) || $reset) {
$include_components = features_get_components();
foreach ($include_components as $component => $info) {
if ($component !== 'views' && !isset($info['api']) && (!isset($info['default_file']) || $info['default_file'] !== FEATURES_DEFAULTS_INCLUDED)) {
unset($include_components[$component]);
}
}
}
And
// Inclusion of defaults for Views.
if ($component === 'views') {
views_include('view');
views_include_handlers();
views_module_include('views_default.inc');
}
I will try to find some time testing this more, and come up with a patch.
Comments
Comment #1
kotnik commentedSecond chunk is missing in 7.x-1.x, but the first one is still here.
Comment #2
hefox commentedI *think* there's a bug report on this somewhere. Something about using custom file doesn't work for $info['default_file'] setting.
Comment #3
kotnik commentedI could find only this that's somewhat related: #853738: features_include_defaults() uses $info['default_file'] without a check.
Comment #4
hefox commented#1246220: features_include_defaults() ignores FEATURES_DEFAULTS_CUSTOM?
Comment #5
mpotter commentedThis was a dup and it's fixed in the latest version.