diff --git a/core/modules/block/block.install b/core/modules/block/block.install index 3a019a2..4771eee 100644 --- a/core/modules/block/block.install +++ b/core/modules/block/block.install @@ -77,12 +77,9 @@ function block_update_8001() { } } - debug($block); $config_storage->write($block_config_name, $block); } - Cache::invalidateTags(['cache.config']); - if ($update_backup) { \Drupal::keyValue('update_backup')->set('block_update_8001', $update_backup); } diff --git a/core/modules/block/src/Tests/Update/BlockContextMappingUpdateTest.php b/core/modules/block/src/Tests/Update/BlockContextMappingUpdateTest.php index dd23d74..6fbda4a 100644 --- a/core/modules/block/src/Tests/Update/BlockContextMappingUpdateTest.php +++ b/core/modules/block/src/Tests/Update/BlockContextMappingUpdateTest.php @@ -46,6 +46,9 @@ public function testUpdateHookN() { // Disable maintenance mode. \Drupal::state()->set('system.maintenance_mode', FALSE); + // We finished updating so we can login the user now. + $this->drupalLogin($this->rootUser); + // The block that we are testing has the following visibility rules: // - only visible on node pages // - only visible to authenticated users. diff --git a/core/modules/system/src/Tests/Update/UpdatePathTestBase.php b/core/modules/system/src/Tests/Update/UpdatePathTestBase.php index fb365f0..da0b3be 100644 --- a/core/modules/system/src/Tests/Update/UpdatePathTestBase.php +++ b/core/modules/system/src/Tests/Update/UpdatePathTestBase.php @@ -185,7 +185,13 @@ protected function runUpdates() { $this->fail('Missing zlib requirement for upgrade tests.'); return FALSE; } - $this->drupalLogin($this->rootUser); + // The site might be broken at the time so logging in using the UI might + // not work, so we use the API itself. + drupal_rewrite_settings(['settings' => ['update_free_access' => (object) [ + 'value' => TRUE, + 'required' => TRUE, + ]]]); + $this->drupalGet($this->updateUrl); $this->clickLink(t('Continue')); diff --git a/core/modules/system/system.install b/core/modules/system/system.install index a0849b1..a5ae797 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -526,7 +526,7 @@ function system_requirements($phase) { $requirements['update access'] = array( 'value' => t('Not protected'), 'severity' => REQUIREMENT_ERROR, - 'description' => t('The update.php script is accessible to everyone without authentication check, which is a security risk. You must change the @settings_name value in your settings.php back to FALSE.', array('@settings_name' => '$settings[\'update_free_access\']')), + 'description' => t('The update.php script is accessible to everyone without authentication check, which is a security risk. You must change the @settings_name value in your settings.php back to FALSE.', array('@settings_name' => '$settings[\'ccess\']')), ); } else { diff --git a/core/modules/system/system.routing.yml b/core/modules/system/system.routing.yml index 9d806bb..a656ab3 100644 --- a/core/modules/system/system.routing.yml +++ b/core/modules/system/system.routing.yml @@ -454,6 +454,8 @@ system.db_update: _title: 'Drupal database update' _controller: '\Drupal\system\Controller\DbUpdateController::handle' op: 'info' + options: + _maintenance_access: TRUE requirements: _access_system_update: 'TRUE' diff --git a/core/modules/system/tests/fixtures/update/drupal-8.block-context-manager-2354889.php b/core/modules/system/tests/fixtures/update/drupal-8.block-context-manager-2354889.php index 736282b..d3af4a1 100644 --- a/core/modules/system/tests/fixtures/update/drupal-8.block-context-manager-2354889.php +++ b/core/modules/system/tests/fixtures/update/drupal-8.block-context-manager-2354889.php @@ -40,7 +40,6 @@ ->fetchField(); $existing_blocks = unserialize($existing_blocks); -debug(array_merge($existing_blocks, ['block.block.testfor2354889', 'block.block.secondtestfor2354889', 'block.block.thirdtestfor2354889'])); $connection->update('key_value') ->fields([ 'value' => serialize(array_merge($existing_blocks, ['block.block.testfor2354889', 'block.block.secondtestfor2354889', 'block.block.thirdtestfor2354889']))