Closed (fixed)
Project:
Features
Version:
8.x-3.4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Feb 2017 at 23:03 UTC
Updated:
24 Mar 2017 at 13:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
boesbo commentedComment #3
boesbo commentedComment #4
Lang Wu Jane commentedI hit the same issue when upgrading from features-8.x-3.2 to 8.x-3.2.
Features is a great module and a very important one to us, thanks for helping look in to this issue!
Comment #5
mpotter commentedHere is a patch for this.
Comment #6
mirie commentedTested this patch -- I was able to revert my feature successfully. Thanks @mpotter!
Comment #8
mpotter commentedCommitted to bb63715 and tagging a 3.4 release. Sorry for this regression!
Comment #9
mirie commentedRe-opening this issue as I found a slight issue on the patch for importing new configuration. Sorry when I was testing earlier, I missed the scenario of importing completely new configuration into the system.
Currently seeing:
I think I have a fix for this -- just testing this out before adding a patch.
Comment #10
mirie commentedAdded patch to support both reverting existing and importing new configuration.
Comment #11
mirie commentedComment #12
mirie commentedI kept digging more on this. So I noticed that even though the feedback from
drush frwas reporting a successful revert, the actual config was not reverting. New configuration, however, was importing correctly.I've attached a new patch -- Although this works, I wasn't sure if this is the correct way to handle configuration revert.
Comment #13
mpotter commentedThis patch goes back to some of the previous code using config_update that we are trying to replace with core code.
The core createConfiguration() function *does* handle creating new configuration. So we shouldn't need to call config_update::revert. All we need to do is handle the case where getData() cannot be called for new config. In that case we just need to pass an empty value and the Features createConfiguration() wrapper will load the config from the module.
Comment #14
mpotter commentedCan you try this patch instead?
Comment #15
mpotter commentedSorry, that looks like your patch in #10. Let me look into this more. The core createConfiguration() function should be importing/reverting existing config and our tests for the FeaturesManager::import() function were passing, so something either isn't getting tested properly or there is some other problem here.
Comment #16
mpotter commentedOK, the FeaturesManager::createConfiguration will load the config from your package if you don't pass any config data. Calling "getData" is returning the *CURRENT* value of the config, not the *NEW* value loaded from your Features module.
So, it's even easier. Try this patch:
Comment #17
mirie commentedThanks for your review and comments @mpotter.
I did another test with the latest patch: features_import_dependency_error-2856466-16.patch.
Test:
drush frato update the configurationResults:
Comment #18
rwam commentedSame issue here like #9. I've checked Patch #16 with 8.x-3.4 and it work's with my updated config now.
Thank you
Ralf
Comment #19
mpotter commentedSlightly improved patch removes extra un-needed call to getConfigCollection. This is what I'll be committing.
Comment #22
mpotter commentedTestbot ran *after* the patch was committed. This is working and fixed.