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've just found that as a result of latest changes, Features is not working anymore with multiple bundles. The problem is when displaying configuration for a bundle it doesn't detect configuration in other bundles (FeaturesAssignmentExisting) and it reports all the other bundles' configuration as Unpackaged.
This is caused by:
#2596063: FeaturesManager::getExistingPackages() should limit to the current bundle
#2596047: Duplicate packages generated
However, I'm wondering: is this an intended change? are bundles supposed to be completely independent / overriding each other?
Comment | File | Size | Author |
---|---|---|---|
#12 | features-bundle-conflict-02.png | 143 KB | Jose Reyero |
#12 | features-bundle-conflict-01.png | 142.7 KB | Jose Reyero |
#6 | features-bug-bundles-02.png | 80.39 KB | Jose Reyero |
#6 | features-bug-bundles-01.png | 84.31 KB | Jose Reyero |
Comments
Comment #2
nedjoAssuming all assignment plugins are enabled and at their default settings, the expected behaviour as I understand it is:
At admin/config/development/configuration/features, if there is a bundle selected in the "Bundle" select, the configuration listed should be limited to what is not provided by any module or the install profile (whether or not that module or profile is marked as a "feature") other than ones that are in the current bundle.
So for example, if you create a bundle, generate some features, export and enable them, then create a new bundle and select it at admin/config/development/configuration/feature, you should see only config that hasn't been assigned to any bundle.
The general use case this is designed to meet is: When you are basing a site off of a distribution, or creating a sub-distribution, you want to leave the original distribution unchanged. So you want to be able to work with everything that's still available on the site, but not what's already part of the other distribution (which might be represented as another bundle). But you might also be a maintainer of the other distribution, in which case you want to be able to switch back to that bundle and work on it.
@Jose Reyero: Is the behaviour I've described different from what you're seeing? Is it different from what you're expecting? Can you explain a bit more about your use case and what you'd like to see happen here? Possibly there's a configuration option we could add to the exclude plugin that would meet your requirements.
Comment #3
Jose Reyero CreditAttribution: Jose Reyero at Axel Springer España commented@nedjo,
This is not what I'm seeing. I see all the config that is not in current bundle (Configuration in other bundles shows up as unpackaged).
This is easier to see if you leave the install profile out of the equation and just create two bundles.
Comment #4
nedjoI can't reproduce this issue. Maybe it's been fixed through a commit on a different issue?
Steps I followed:
@Jose Reyero: can you have another look and, if you can still reproduce from a new install, give steps? Thanks!
Comment #5
nedjoAh, but when I try this I do see an error:
Comment #6
Jose Reyero CreditAttribution: Jose Reyero at Axel Springer España commentedThanks @nedjo, but not sure we are getting anywhere here. These are screenshots with:
- A fresh checkout of Features, Config Update, Drupal Core
- A "Bundle One" with a feature containing the Article content type.
- A "Bundle Two" with a feature containing the Basic page content type.
As you can see, added configuration in one bundle appears as unpackaged in the other, namespaces are messed up (see the red warnings), etc...
I'd provide a patch but I really need to clear this out first, because this is a critical atm on my list, latest version is just not usable at all with multiple bundles, besides being a big patch (rolling back most of the commits mentioned in #1).
Comment #7
nedjoI'm having a look.
Comment #9
nedjoSome at least of this bug arose from changes introduced in #2443589: Offer ability to add configuration overrides to install profile. Instead of unsetting configuration that's provided by extensions, we mark it as extension-provided. I found and fixed an error in the test for extension-provided configuration in
FeaturesManager::assignConfigPackage()
.That won't address the bug of namespaces apparently being added twice, which may need a separate bug report. But it may have fixed the originally reported issue.
@Jose Reyero: is this working better?
Comment #10
nedjo@Jose Reyero:
I posted #2606926: Error "The following module is missing from the file system" and applied an attempted fix. If you get a chance, could you look at that too and see if that's addressed the issue? Thanks!
Comment #11
nedjoIn #2606926: Error "The following module is missing from the file system" I included a relevant fix.
The issue was in the 'exclude' assignment plugin. A configurable option allows exclusion of extension-provided configuration. That can be overridden by selecting the option to not exclude configuration provided by the install profile. This handling seems a likely source of the issue reported in this issue. Because of the install profile exception, configuration that had been exported already reappeared.
A simple fix would be to disable the exception for the install profile, which is really useful only after first installing a site.
Still, because there doesn't seem to be a valid use case for skipping the exclusion of profile-provided configuration if that configuration has been re-exported, I made the following change (see patch):
Together with the previous fix in this issue the original problem should be addressed, but please reopen if not.
Comment #12
Jose Reyero CreditAttribution: Jose Reyero at Axel Springer España commentedThanks, latest patches have been some improvement. There are still some issues though.
Attached screenshots of my features:
a) With al the plug-ins enabled and in default state (conflict-01)
b) Disabling the "Base type" plug-in, it may be some clue (conflict-02)
Note the reported Conflicts, I cannot find a reason for them.
One more issue is existing features not being reported when selecting Bundle "None". Previously all the features were being displayed when no bundle selected. Is this intended behavior?
@nedjo,
Not sure I get this.... What if I'm not building a distribution, but single feature modules? Then they should be independent of the install profile, shouldn't they?