Closed (won't fix)
Project:
Features
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Mar 2012 at 09:51 UTC
Updated:
7 Aug 2013 at 18:33 UTC
Jump to comment: Most recent file
Comments
Comment #1
cameron tod commentedComment #2
hefox commentedMy fault :(
Possible solutions:
Solution a:
Remove the line at the bottom should fix it. Whether something should add a dependency or not is complicated to guess. Keep getting false dependencies.
Solution b:
Remove from node_features_export
Solution 3:
Add some detecting to live above to not pipe in already defined fields.
Solution 4:
Change piping to somehow indicate "this is suggested by not dependency, so only add if not already defined" "This is a dependency and needed for this feature to work"
So what's needed is either removing or change the dependency detection or make piping smarter to know whether things are dependent part of the feature or just suggestions.
Comment #3
hefox commentedThis is a quickie, untested, probably-has-a-syntax-error patch for solution 4.
Not happy with it.
Comment #4
hefox commentedHad some extra stuff
Comment #5
cameron tod commentedDoesn't seem to work in our case. If it helps at all, the dependency override is in the views component of the feature.
Comment #6
cameron tod commentedActually ignore that, I don't think the patch applied to my copy of rc1.
Comment #7
cameron tod commentedThe patch was missing a closing bracket, here's a copy with it back in.
Comment #8
cameron tod commentedOK, so it appears that this patch fixes the issue as posted, thanks! :)
I'm having other issues with weird overrides on other types of elements, but I'll try to work out exactly what is happening before I post a bug.
Comment #9
hefox commentedSolution 5) Add a new hook called hook_features_export_suggestions (eventually that can be configured to run or not [so those that don't want non-dependencies items added can opt out]).
Totally favoring this idea now.
Comment #10
hefox commentedThis is sleep deprived take 1 on solution 5, which is prob what should have done originally with _features_resolve_depenenencies logic. There was quite a bit of extra code that should have removed originally from the respective hook_features_export; all code checking if item was already exported to another wasn't needed anymore so a lot of moving around was due to that.
Needs documentation (introduces a hook, changes purpose of another sorta)/testing.
There is api addition, but not removal.
Api addition hook_features_pipe_suggestion (not really attached to that name) + alter hooks: component hook where components can suggest additional items to complete this export (i.e. node suggest fields, views/contextes can suggests content types) that are not required for basic operating of the module.
This allows processing for any duplicates, but indicates the items are not required so 'gracefully' disappear from the suggested. Existing pipe/export hooks should generally still work, but may be vulnerable to this issue till updated.
So tl;dr: new suggestions hook, pipe and features_export to be focused on adding items required for basic functioning.
Comment #11
cameron tod commentedThanks for this. As tested it solves the fields issues but the image style and views dependency stuff is still reporting overridden.
Interestingly enough, the old features have a dependency like this:
which are now showing as overriden, as they are no longer part of the 'current' feature.
I have done only very rudimentary testing.
I have some work to do today on some other bits and pieces but I'll try to play around with the new hooks and changes to see if I can massage things just right.
Comment #12
hefox commentedAre you on latest dev? I suspect that is related the recent ctools api issues.
Here's a new patch with features.api.php updated.
Comment #13
hefox commentedHad added a new function around export options calling, so updated other places to use that function
Comment #14
cameron tod commentedNope, we're on rc1, will move to rc2. We need to maintain a stable module release set for our production sites but I can test ctools dev locally to sort out this bug. Gimme a bit...
Comment #15
hefox commentedTests were missing
Comment #16
Grayside commentedTested and it works.
Now on to bikeshedding and petty issues. (Posting this, will reroll the patch with at least some of these changes next.)
features_test_additional Not the greatest name, but I can't think of anything better. Would like to see a better desription for the module and a /tests directory readme that explains both features_test modules and what they are for.
Agreed, hook_features_pipe_suggestion is a bit of a strange name. It's not so much suggesting pipes as it is suggested components for the feature, which it does by adding them to the pipe. Separate hook from hook_features_pipe_alter() is intended to maintain backwards compatibility, but let's clarify names more. hook_features_component_suggestion?
And some minor bits:
whitespace eol
whitespace eol
Other issue followup--examples that use generic words like "component" only help developers that have already figured out what we mean by component.
Would move explanation of pipe to end and expand to full sentence instead of a couple words in parentheses. (Also, spelling of dependent)
whitespace eol
Move an explanation of the pipe to next paragraph and expand. Can reuse text from above.
in_array($needle, $haystack)
provided by what?
Grammar a bit fuzzy.
whitespace eol, this and another ten or so below.
Comment #17
Grayside commentedAddressed most of the concerns. In the end, could not identify a better hook name (my proposed would have confused hook_pipe_COMPONENT_alter() and hook_component_suggestions_alter() a little to close for comfort.
Also, didn't feel like writing a README for the testing section, but did bundle features_test into it's own subdirectory to clean things up.
Comment #18
kclarkson commentedI applied the patch in #17 but it did not clear my conflicts.
Comment #19
hefox commentedThis is a patch against latest head + #1537838: Upgrading to 7.x-1.0-rc2 (from rc1) breaks taxonomy creation
It also removes the move of the feature features_test to folder features_test to keep from conflicting again.
Comment #20
hefox commentedwhite space issues
Comment #21
hefox commentedYeaaa this is suppose to be module_exists($map[$item]) not module_exists($module_name)
*head desk*
Comment #22
mpotter commentedThis issue has languished and needs attention if it's still a problem. However, with the split of field_base and field_instance you shouldn't run into any problem anymore with fields in a different feature from the node.
Re-open this with an updated patch if this is still something needed in 2.x