$variables = array_diff($variables, array_keys(strongarm_vars_load()));
added in http://drupalcode.org/project/panelizer.git/commit/930e774d12599a3f01787...
strongarm_vars_load "Load all variables (DB and Strongarmed)." which is well, all variables. http://drupalcode.org/project/strongarm.git/blob/refs/heads/7.x-2.x:/str... so that removes all variables, other than one's that don't exist which were already removed by earleir variable_get === null, unset
Features is suppose to not be double exporting, unless set to, so this seems like it can just.. go away
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | panelizer-n1992106-5.patch | 2.18 KB | damienmckenna |
Comments
Comment #1
hefox commentedActually, it's needed because it's the wrong hook to use. The hook to use is one of hook_features_pipe_COMPONENT_alter ones, in this case hook_features_pipe_panelizer_defaults_alter. Export alter isn't reprocessed, which resolves the duplicates, etc.
I really don't get the module_exists strongarm, is there another module defining the 'variables' component that is being swapped out?
Comment #2
mpotter commentedYes, this looks like the correct way to handle this with Features.
Comment #3
damienmckenna@hefox: Like you said, given that Strongarm is the only (?) module that exports variables, shouldn't the entire logic be based upon whether Strongarm exists?
Comment #4
hefox commentedVariable isn't name space so it's possible someone has implemented a seperate variable processing thing
However I'm pretty damn certain:
1) Options that do not have a corresponding build are thrown out, so don't need any checking if strongarm exists
2) Variables that are not set are thrown out, so don't need === nulll
So likely all that is needed is something like:
Comment #5
damienmckennaSo you mean something like this?
Comment #6
damienmckennaI tested it out, it worked fine. Thanks for the help, hefox!