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.
The taxonomies set up by my feature modules are no longer created after I upgraded to features 7.x-1.0-rc2. Downgrading back to rc1 makes the taxonomies be set up again as they should.
Comment | File | Size | Author |
---|---|---|---|
#14 | features_1537838_features_get_components_14.patch | 6.8 KB | hefox |
#13 | features_1537838_features_get_components_13.patch | 5.76 KB | hefox |
#9 | features-component_reset-1537838-9.patch | 370 bytes | JvE |
Comments
Comment #1
gaas CreditAttribution: gaas commented'git bisect' tells me that this commit introduced the problem:
Comment #2
steinmb CreditAttribution: steinmb commentedChanging to critical then this problem is rather critical.
Comment #3
hefox CreditAttribution: hefox commentedComment #4
gaas CreditAttribution: gaas commentedYes, it's the taxonomy vocabularies that do not get created (3 of them, split between 2 different feature modules). The node types and other stuff seems to get created as they should.
The missing vocabularies is what I observe after 'drush site-install' with a profile that depends on my feature modules. After installing the site the features that define these vocabularies think they are up-to-date even if the vocabularies did not show up (in the database).
I can do some more experiments with this tomorrow (euro time). I don't have that code or site available where I'm now. If you think there are other things I can try, or information to gather please tell me.
Comment #5
hefox CreditAttribution: hefox commentedMake sure the [feature].features.taxonomy_vocabulary.inc (think that's the file) is included at during install process
See what the diff is saying (install diff module).
Comment #6
JvE CreditAttribution: JvE commentedI've just encountered this issue as well.
It only occurs when installing through Drush (both 4.5 and 5.1) with an install profile that uses a feature that has vocabularies.
Manually installing works fine.
Using drush to enable the feature once the site is installed works fine.
When features_include(TRUE); from features_modules_enabled is commented out the install works fine.
I suspect that somewhere along that chain a bit too much is being re-set, but I'm no features/ctools/drush expert.
Comment #7
gaas CreditAttribution: gaas commentedI also verified that commenting out the
features_include(TRUE)
call avoids the problem.What's interesting is that changing it to
features_include(FALSE)
doesn't make a difference. The vocabularies still don't show.So it looks like it is the the fact that feature_include() is triggered by this code before it would normally be included that is the problem. If I apply this patch then my 'site-install' works as expected. With luck the original fix isn't harmed by this either :-)
Comment #8
hefox CreditAttribution: hefox commentedI suspect features_include is a red herring; including it triggered the bug, but my guess is another function is bugged.
I'd be really curious what happens during the first features_rebuild after the module is enabled
inside _features_restore (think that's the name)
if ( currently reverting that feature module) {
.. see if taxonomy_vocabulary file has been included, etc.
}
Also, I'd be curious if moving the features_include to the top of the features_modules_enabled helps.
Comment #9
JvE CreditAttribution: JvE commentedI think the problem is that previously features_include() was called for the first time after all the dependencies (like taxonomy) of the feature were installed and enabled.
With the features_include call in the features_modules_enabled function the first call of features_include() moves up to the point where the features module is installed.
This causes features_get_components() to statically cache the available components which at that point is limited to only the installed modules so far.
My solution was to extend the $reset parameter to the features_get_components() call:
I'm not sure if this is a 100% solution, so I'm attaching a patch and marking for review.
Comment #10
hefox CreditAttribution: hefox commentedHm, fix makes sense. However, will slow things down a bit, but likely can clean that up #1530386: Avoid unnecessary cache rebuilds and improve installation performance
Comment #11
hefox CreditAttribution: hefox commentedSemi duplicate #1265168: Rebuild the file list properly when a feature is enabled or disabled
Comment #12
hefox CreditAttribution: hefox commentedBased on comments here and in #1265168: Rebuild the file list properly when a feature is enabled or disabled, patch should address the issue + works in the base case that clears that cache when features_include(TRUE) is called + makes sense + simple patch = RTBC
Comment #13
hefox CreditAttribution: hefox commentedFix + tests.
My was it painful to reproduce the error.
Comment #14
hefox CreditAttribution: hefox commentedMissing addition of new file (added vocabulary to export)
Comment #15
JvE CreditAttribution: JvE commentedI can imagine. I got a headache just trying to think of where to start writing a test for this.
Yours is quite elegant and appears to work as it should (if we ignore the sneaking in of unrelated coding standard fixes ;)
Note that it can crash on taxonomy_features_api() not existing when combined with related bugs.
Comment #16
bojanz CreditAttribution: bojanz commentedConfirming RTBC.
Comment #17
mrfelton CreditAttribution: mrfelton commentedWith the patch from #14 applied to RC2, I get the following errors, with or with out the patch from #1530386: Avoid unnecessary cache rebuilds and improve installation performance (commet 6) also applied.
I actually get this printed 3 times in a row.
Comment #18
Damien Tournoud CreditAttribution: Damien Tournoud commented@mrfelton: you probably applied the patch twice and ended up with two (or more) FeaturesEnableTestCase classes in
tests/features.test
. Just remove the unwelcome duplicates.Comment #19
gaas CreditAttribution: gaas commentedI've now verified that rc2 + features_1537838_features_get_components_14.patch avoids the install problem in my setting as well. Thanks!
Comment #20
steinmb CreditAttribution: steinmb commentedBump, any chance to this committed?
Best reg.
Stein
Comment #21
mpotter CreditAttribution: mpotter commentedCommited to a2e030d.