Closed (fixed)
Project:
Features
Version:
7.x-1.0-rc2
Component:
Taxonomy
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Apr 2012 at 07:17 UTC
Updated:
27 Jun 2012 at 13:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
gaas commented'git bisect' tells me that this commit introduced the problem:
Comment #2
steinmb commentedChanging to critical then this problem is rather critical.
Comment #3
hefox commentedComment #4
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 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 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 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 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 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 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 commentedSemi duplicate #1265168: Rebuild the file list properly when a feature is enabled or disabled
Comment #12
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 commentedFix + tests.
My was it painful to reproduce the error.
Comment #14
hefox commentedMissing addition of new file (added vocabulary to export)
Comment #15
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 commentedConfirming RTBC.
Comment #17
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 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 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 commentedBump, any chance to this committed?
Best reg.
Stein
Comment #21
mpotter commentedCommited to a2e030d.