Problem/Motivation
When upgrading from 9.0.0 to 9.3.0, and running drush updatedb, I see the following error which prevents the database from being updated
$ drush updatedb
---------- -------------------- ------------- --------------------------------
Module Update ID Type Description
---------- -------------------- ------------- --------------------------------
system sort_all_config post-update Sort all configuration
according to its schema.
taxonomy clear_views_argume post-update Clear the cache after
nt_validator_plugi deprecating Term views
ns_cache argument validator.
tour joyride_selectors_ post-update Convert Joyride selectors to
to_selector_proper `selector` property. @see
ty tour_tour_presave()
user update_roles post-update Calculate role dependencies
and remove non-existent
permissions.
views configuration_enti post-update Clear errors caused by
ty_relationships relationships to configuration
entities.
views remove_sorting_glo post-update Clear caches due to removal of
bal_text_field sorting for global custom text
field.
views rename_default_dis post-update Rename the setting for showing
play_setting the default display to
'default_display'.
views sort_identifier post-update Add the identifier option to
all sort handler
configurations.
views title_translations post-update Rebuild routes to fix view
title translations.
---------- -------------------- ------------- --------------------------------
Do you wish to run the specified pending updates? (yes/no) [yes]:
> yes
> [notice] Update started: system_post_update_sort_all_config
> [error] The configuration property display.default.display_options.empty.area.content.valu
e doesn't exist.
> [error] Update failed: system_post_update_sort_all_config
[error] Update aborted by: system_post_update_sort_all_config
[error] Finished performing updates.
Steps to reproduce
- Install 9.0.0
- Upgrade to 9.3.0
- Run drush updatedb
Proposed resolution
Handle the configuration property that doesn't exist
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 3254446.patch | 745 bytes | catch |
| Screen Shot 2021-12-14 at 2.27.38 PM.png | 463.79 KB | danielflippance |
Comments
Comment #2
cilefen commentedComment #3
cilefen commentedIs that precisely the steps to reproduce, and you have done only that?
Comment #4
luke.leberI've encountered this as well. I'm thinking that any configuration that can't be re-saved for any reason will cause the post-update to abort.
In our case it was invalid / unused custom configuration from about 4 years ago that threw a monkey wrench in. I didn't trudge through debugging anything, but just removed the troublesome config from active storage before running the upgrade.
Comment #5
stephencamilo commentedComment #6
hestenetReset issue status.
Comment #7
josh.chambers commentedI'm getting a similar problem when trying to update from Drupal 9.2.19 to 9.3.13, I'm getting the following:
I've tried finding any instance of this a8326718-c723-47db-b47a-3e3ceba12fac in any config and tried changing it's value, tried changing it's value to '0' (as one of them was set to). I've tried completely deleting the config files with these references in it as far as I can tell (doing all manner of search doesn't come up with any files in the install with that text) and I am getting the same error, so I am kind of at a loss as to what is causing it or even how to fix it.
I was hoping deleting those configs (it was for something we weren't using anymore anyway) would fix it, but alas.
Edit: I should note, this is straight from a 9.2.19 install that works, and the only thing I'm doing is updating drupal/core
Edit 2: So I think what might have been happening is I deleted the module that was adding a content type, but the content type itself hadn't been deleted. I went in and deleted the actual content type and that seemed to fix the error...
Comment #8
catchMaybe we can catch and log the exception instead of aborting the update.
Comment #10
darvanenLooks good to me, is there any way a test can be written for it or is that not really necessary here?
Comment #12
gilsbert commentedPatch on #8 works on 9.5.
Comment #13
xjmComment #14
xjmComment #17
xjmIdeally, we would have an upgrade path test for this, and a more complete fix. However, since Drupal 9 is end-of-life, this upgrade path is removed from D10, and this is an upgrade path critical sensitive to any config data integrity and will stop sites from upgrading to 9.5 and therefore to D10, I committed the fix as-is to 9.5.x.
I also actually cherry-picked it to 9.4.x. Normally, the security-only branch does not receive bugfixes, but we make an exception for issues that would prevent sites from updating.
Thanks!
Comment #18
xjmAdding issue credit for some of the debugging and the original issue report; I went a little overboard un-checking because of the file attachment.