Skip to content
Snippets Groups Projects
Commit da5aa80e authored by catch's avatar catch
Browse files

Issue #1331370 by beejeebus, plach: Fixed [Upgrade path broken] Stored include...

Issue #1331370 by beejeebus, plach: Fixed [Upgrade path broken] Stored include paths need to be updated to /core before running the upgrade path.
parent 7500befb
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -101,6 +101,12 @@ function update_prepare_d8_bootstrap() { ...@@ -101,6 +101,12 @@ function update_prepare_d8_bootstrap() {
), ),
); );
if ($has_required_schema) { if ($has_required_schema) {
// Bootstrap variables so we can update theme while preparing the update
// process.
drupal_bootstrap(DRUPAL_BOOTSTRAP_VARIABLES);
// Update the dynamic include paths that might be used before running the
// proper update functions.
update_prepare_stored_includes();
// Update the environment for the language bootstrap if needed. // Update the environment for the language bootstrap if needed.
update_prepare_d8_language(); update_prepare_d8_language();
...@@ -127,6 +133,22 @@ function update_prepare_d8_bootstrap() { ...@@ -127,6 +133,22 @@ function update_prepare_d8_bootstrap() {
} }
} }
/**
* Fix stored include paths to match the "/core" migration.
*/
function update_prepare_stored_includes() {
// Update language negotiation settings.
foreach (language_types() as $language_type) {
$negotiation = variable_get("language_negotiation_$language_type", array());
foreach ($negotiation as $id => &$provider) {
if (isset($negotiation[$id]['file']) && $negotiation[$id]['file'] == 'includes/locale.inc') {
$negotiation[$id]['file'] = 'core/includes/locale.inc';
}
}
variable_set("language_negotiation_$language_type", $negotiation);
}
}
/** /**
* Prepare Drupal 8 language changes for the bootstrap if needed. * Prepare Drupal 8 language changes for the bootstrap if needed.
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment