in #1784312: Stop doing so much pre-kernel bootstrapping introduced a BootstrapConfigStorageFactory which I don't understand at all. It references $conf['drupal_bootstrap_config_storage'] but is the only place in core to do so. I also don't see that part discussed in this issue at all.
I'm hitting this in the D7 -> D8 upgrade path. BootstrapConfigStorageFactory is called from DrupalKernel::registerBundles which is called (a couple levels up in the stack) from DrupalKernel::boot() right in update_fix_d8_requirements(). Most importantly this is called before checking if settings.php exists. Excerpt:
// Bootstrap the kernel.
// Do not attempt to dump and write it.
$kernel = new DrupalKernel('update', FALSE, drupal_classloader(), FALSE);
$kernel->boot();
// Check whether settings.php needs to be rewritten.
$settings_exist = !empty($GLOBALS['config_directories']);
Therefore in BootstrapConfigStorageFactory the call to config_get_config_directory() happens with empty global $config_directories and everything blows up. I have no idea how the upgrade path even remotely works at this point (it doesn't for me locally). The reason I am not opening a new issue is that I am not able to make any sense at all of BootstrapConfigStorageFactory.
The attached patch resolves the fatal at least, but update.php still doesn't spit anything out.
Comment | File | Size | Author |
---|---|---|---|
#4 | 1943726_4.patch | 3 KB | chx |
#4 | interdiff.txt | 632 bytes | chx |
#2 | 1943726_2.patch | 2.32 KB | chx |
Comments
Comment #1
chx CreditAttribution: chx commentedI think this comes from http://drupal.org/node/1856972 . The call chain is update_fix_d8_requirements, update_module_enable, config() , kaboom.
Comment #2
chx CreditAttribution: chx commentedWait, no, update_prepare_d8_bootstrap runs first, and that calls kernel before the config dir is set. It's not update_fix_d8_requirements(). Comments say:
Not anymore, no:
file_uri_scheme($directory)
returns a FALSE andshortcuts the stream wrapper call. This has been accidentally fixed on December 29 in #1874612: Simplify file.inc by file_stream_wrapper_valid_scheme(FALSE) return FALSE.
Comment #4
chx CreditAttribution: chx commentedComment #5
andypost@chx Please provide a steps for manual testing. Which modules should be enabled.
Also there's related issue #1919002: Upgrade to D8 broken when D7 has more then one language enabled
Comment #6
chx CreditAttribution: chx commentedWell, if you have a D7 site and you try to upgrade it to D8, it would seem that the update currently can't work, at all, and that's what tstoeckler reported. I am not 100% how to reproduce it myself. I am not sure either why the automated testing is passing because UpgradePathTestBase::setup calls TestBase::prepareEnvironment which calls $this->prepareConfigDirectories() but that is overridden in UpgradePathTestBase to do nothing. And config_get_config_directory() have a special case which uses the configuration directory prepared in prepareConfigDirectories for all tests. This probably needs further research, if someone can post detailed reproduction instructions, that'd be helpful.
Comment #7
andypostThere was 2 kernels #1885964: Avoid the creation of more than one DrupalKernel instance because of
drupal_verify_profile()
Comment #8
alippai CreditAttribution: alippai commentedBefore applying the patches I get errors:
The patch fixes these errors however I get stuck here, so I can't complete the installations. The php error log is clean, a bunch of watchdog entries say that
Theme hook %hook not found.
Testing environment: Debian Squeeze with dotdeb.org repository, Apache 2.2, PHP 5.4, MySQL 5.5, APC enabled. D8 and D7 works without problems. Used 'Standard' installation profile, only the default modules enabled. Upgrade run in maintenance mode.
Comment #9
alippai CreditAttribution: alippai commentedAfter cache clear and theme registry rebuild it works. I think it needs a follow-up issue, but this is RTBC.
Comment #10
webchickWell that certainly seems to clean up a lot of ugly code! The testing instructions around this (or even what the bug itself is) seem a bit sketchy to me though, and I'm worried this might introduce some problems elsewhere. But I guess I'm ok with committing this to get it in front of more people and see what happens. :)
Committed and pushed to 8.x. Thanks!
Comment #11
YesCT CreditAttribution: YesCT commentedtagging.
Comment #12
sunI doubt that this change was sufficiently tested.
Comment #13.0
(not verified) CreditAttribution: commentedUpdated issue summary.