Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I guess we should exclude the feature that is going to be re-created from the list of its possible dependencies.
It is a confusion and would lead to unexpected behavior (the problems with enabling/disabling/installing/uninstalling).
Reproducing is simple: just visit admin/structure/features/{feature_name}/recreate for any existing feature - you will see that "Dependencies" includes the feature itself as unchecked possible dependency.
Comment | File | Size | Author |
---|---|---|---|
#13 | clean_dependency_on_feature_prepopulate-2089113-13.patch | 573 bytes | alex.skrypnyk |
| |||
#11 | clean_dependency_on_feature_prepopulate-2089113-11.patch | 619 bytes | diego21 |
#4 | 2089113-features_export_options_depedency-3.patch | 6.32 KB | hefox |
Comments
Comment #1
mpotter CreditAttribution: mpotter commentedI am not seeing this on any of my test sites. Are you sure it's not something special to your feature or that maybe you have another contrib module messing this up? Otherwise post a specific example of a feature that has this problem on a clean Drupal site.
Comment #2
hefox CreditAttribution: hefox commentedI've seen this
semi related #2009386: Creating permissions inside a feature makes the feature dependent on itself #2029247: Feature added itself as a dependency ... can never be enabled
Comment #3
hefox CreditAttribution: hefox commentedhttp://gyazo.com/c034e1f37d6e502bfb879e71eabf93d8 2.x on fresh drupal install
Comment #4
hefox CreditAttribution: hefox commentedwith tests
Comment #5
mpotter CreditAttribution: mpotter commentedCommitted to 69df8e1 (and fixed 2 whitespace errors in patch)
Comment #6
mpotter CreditAttribution: mpotter commentedThis patch actually causes issues with Entity API by changing the interface of the hook_features_export_options() function. I think this needs to be reverted and a better solution found. I'd rather not break compatibility with other modules this close to a Features 2.0 release even if Entity API shouldn't technically be adding it's own arguments to our API functions. See #2104245: Error - Unsupported operand types in sites/all/modules/entity/entity.features.inc.
Comment #7
mpotter CreditAttribution: mpotter commentedSo I misunderstood the original problem. I thought the feature itself was being checked automatically. The fact that it is listed as a possible dependency makes this a much less serious issue. Definitely going to revert this given the issue with Entity API. Let's try to find a different approach for this issue.
Comment #8
mpotter CreditAttribution: mpotter commentedComment #9
hefox CreditAttribution: hefox commentedThere's a function that is being called during depedencies_features_export that should be called at the end instead that does various cleanup
edit: ignore this comment, was thinking of a different issue
Comment #10
mpotter CreditAttribution: mpotter commentedPostponing this until Features 2.1 and after Entity API has released a fix so this doesn't break in the future.
Comment #11
diego21 CreditAttribution: diego21 commentedCould this be a solution to this issue?
Thanks :-)
Comment #13
alex.skrypnykre-rolled #11 against 7.x-2.10