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

Comments

danielflippance created an issue. See original summary.

cilefen’s picture

Title: Update failed: system_post_update_sort_all_config » Update failed: system_post_update_sort_all_config, The configuration property display.default.display_options.empty.area.content.value doesn't exist.
cilefen’s picture

Is that precisely the steps to reproduce, and you have done only that?

luke.leber’s picture

I'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.

stephencamilo’s picture

Status: Active » Closed (won't fix)
hestenet’s picture

Status: Closed (won't fix) » Active

Reset issue status.

josh.chambers’s picture

I'm getting a similar problem when trying to update from Drupal 9.2.19 to 9.3.13, I'm getting the following:

>  [notice] Update started: system_post_update_sort_all_config
>  [error]  The configuration property third_party_settings.panelizer.displays.default.blocks.a8326718-c723-47db-b47a-3e3ceba12fac.formatter.settings.location.value 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. 

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...

catch’s picture

Status: Active » Needs review
StatusFileSize
new745 bytes

Maybe we can catch and log the exception instead of aborting the update.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

darvanen’s picture

Looks good to me, is there any way a test can be written for it or is that not really necessary here?

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

gilsbert’s picture

Status: Needs review » Reviewed & tested by the community

Patch on #8 works on 9.5.

xjm’s picture

Title: Update failed: system_post_update_sort_all_config, The configuration property display.default.display_options.empty.area.content.value doesn't exist. » Update failed: system_post_update_sort_all_config: The configuration property $foo doesn't exist.
xjm’s picture

Title: Update failed: system_post_update_sort_all_config: The configuration property $foo doesn't exist. » Log the exception rather than aborting the update if a configuration item does not exist in system_post_update_sort_all_config()

  • xjm committed 6eb195c0 on 9.5.x
    Issue #3254446 by catch: Log the exception rather than aborting the...

  • xjm committed f508cabb on 9.4.x
    Issue #3254446 by catch: Log the exception rather than aborting the...
xjm’s picture

Version: 9.5.x-dev » 9.4.x-dev
Status: Reviewed & tested by the community » Fixed

Ideally, 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!

xjm’s picture

Adding issue credit for some of the debugging and the original issue report; I went a little overboard un-checking because of the file attachment.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.