Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem
update_prepare_d8_bootstrap()
performs a range of adjustments, which are only executed when the System module schema is< 8000
, which means they are not executed for D8 sites.
Goal
- Allow me to upgrade my D8 DUG site. :)
Proposed solution
- Use individual conditions for the bootstrap adjustments performed in
update_prepare_d8_bootstrap()
. - Fix
_drupal_bootstrap_configuration()
to only set the error/exception handlers afterconfig()
is ready. - Fix
DrupalKernel
to account for a potentially empty module list. - Add
update_get_schema_version()
to retrieve the schema version of an extension.
Notes
- With attached patch, I'm successfully able to update from a ~6 months old database dump.
- Also attaching my
head2head.php
script, which needs to perform additional database adjustments before update.php is executed due to a few re-purposed module updates.
Related issues
Comment | File | Size | Author |
---|---|---|---|
#4 | head2head.4.patch | 19.39 KB | sun |
#4 | interdiff.txt | 813 bytes | sun |
#2 | head2head.2.patch | 19.19 KB | sun |
#2 | interdiff.txt | 1.98 KB | sun |
head2head.php_.txt | 1.87 KB | sun |
Comments
Comment #2
sunTurns out that the existing upgrade path does not unset/unlock the overridden module list after performing base system adjustments in
update_prepare_d8_bootstrap()
, which means that the first request to update.php essentially implements #922996: Upgrade path is broken since update.php does not enforce empty module list already, but not any later/subsequent requests.Due to control structure changes in this patch, the module list override is applied to all update.php requests but never unset, so all module updates that call into functions in .module files failed with a fatal error.
Attached patch ensures that the module list is reset back (unlocked), so .module files are loaded.
Adjusting update.php to not load any modules is out of scope here and left for aforementioned issue.
Comment #4
sunFixed File module must not be enabled on existing D8 sites that do not need it.
Comment #5
sun#4: head2head.4.patch queued for re-testing.
Comment #5.0
sunUpdated issue summary.
Comment #6
marcingy CreditAttribution: marcingy commentedAs I understood head2head is not supported until a alpha is released? That was how it was in d7.
Comment #7
aspilicious CreditAttribution: aspilicious commented#6 true
Comment #7.0
aspilicious CreditAttribution: aspilicious commentedUpdated issue summary.
Comment #7.1
sunUpdated issue summary.
Comment #8
jibran4: head2head.4.patch queued for re-testing.
Comment #10
sunObsolete.