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.
Added some stuff to a feature that conflicted with existing features. Features used to resolve that automatically.
Did a feature update via drush
Conflicts added :(
git show b6fe29f4
Shows some commented out code including
// _features_resolve_dependencies($data, $export, $module_name, $component);
Remove that line and conflicts are resolved automatically (e.g. turned to dependencies) again.
Was the intent to remove this line permanently or just a oops/intended to go back and fix this line to work for no-conflict and conflict mode?
Comments
Comment #1
mpotter CreditAttribution: mpotter commentedI believe it was intended to go back and fix this line to handle no-conflict mode. Although I also seem to remember that Features was being pretty aggressive about it's conflict and dependency handling
Comment #2
rudiedirkx CreditAttribution: rudiedirkx commentedI'm having this problem with
user_permission
items. They're already in another feature, and this feature adds them too, (because of a context with node type dependency). Uncommenting this line fixes it.It's very strange that this problem only happens with
user_permission
. The rest of the components aren't added double, even though the context pipe adds the entire content type feature (which consists of much more than just permissions).Comment #3
rudiedirkx CreditAttribution: rudiedirkx commentedThe user permissions thing was 'fixed' in #2662740: User permissions are featurized double, if piping to it, because it misses the component-to-dependency check. I don't think that fixes this issue.
Comment #4
Rafal LukawieckiThe patch in #2662740: User permissions are featurized double, if piping to it, because it misses the component-to-dependency check helped me resolve the issue of user_permission constantly re-adding permissions that were already featurised in another feature, and thus creating conflicts. The workaround prior to using that patch that I have relied on was to turn on "Allow conflicts", deselect the permissions, and create the feature. The patch is easier, though.