diff -u b/core/includes/config.inc b/core/includes/config.inc --- b/core/includes/config.inc +++ b/core/includes/config.inc @@ -179,6 +179,7 @@ * The storage to synchronize configuration to. */ function config_sync_changes(array $config_changes, StorageInterface $source_storage, StorageInterface $target_storage) { + $factory = drupal_container()->get('config.factory'); foreach (array('delete', 'create', 'change') as $op) { foreach ($config_changes[$op] as $name) { if ($op == 'delete') { @@ -188,10 +189,9 @@ $data = $source_storage->read($name); $target_storage->write($name, $data); } + $factory->resetConfig($name); } } - // Config might have changed, reset the stored config objects. - drupal_container()->get('config.factory')->resetConfigs(); } /** diff -u b/core/lib/Drupal/Core/Config/ConfigFactory.php b/core/lib/Drupal/Core/Config/ConfigFactory.php --- b/core/lib/Drupal/Core/Config/ConfigFactory.php +++ b/core/lib/Drupal/Core/Config/ConfigFactory.php @@ -76,5 +76,13 @@ function resetConfigs() { - $this->configs = array(); + foreach ($this->configs as $config) { + $config->init(); + } + } + + function resetConfig($name) { + if (isset($this->configs[$name])) { + $this->configs[$name]->init(); + } } } diff -u b/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php --- b/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -160,6 +160,7 @@ $bundles = array( new CoreBundle(), ); + $this->bundleClasses = array('Drupal\Core\CoreBundle'); // Ensure we know what modules are enabled and that their namespaces are // registered.