Problem/Motivation

Error message after updating to Drupal core 11.4.7 and Display Builder 1.0.0-beta7 and running Drupal database update:

The following updates returned messages:
display_builder module
Update #3
Failed: InvalidArgumentException: The configuration property islands.state.revert.value doesn't exist. in Drupal\Core\Config\Schema\ArrayElement->get() (line 100 of /var/www/html/web/core/lib/Drupal/Core/Config/Schema/ArrayElement.php).

Steps to reproduce

  1. Using composer, update from Drupal core 11.4.5 to 11.4.7 and from Display Builder 1.0.0-beta6 to 1.0.0-beta7 with all dependencies.
  2. In the Drupal UI, run updates.
  3. Error message displays.

The front end of the site looks as expected and the display builder pages and panels appear to be working (for example, "logs" is now merged into "history").

I cleared caches and ran Drupal database update again and it continues to report that display_builder module has 6 pending updates. When I apply the pending updates, Drupal reports "Completed 7 of 7" and then displays the same error as above.

Proposed resolution (tested)

To fix it until beta8, need to run this:

drush php:eval '
$f = \Drupal::configFactory();
foreach ($f->listAll("display_builder.profile.") as $name) {
  $c = $f->getEditable($name);
  $r = $c->getOriginal("islands.state.revert", FALSE);
  if (is_array($r)) {
    $c->set("islands.state.revert", ($r["value"] ?? "label") !== "hidden")->save(TRUE);
  }
}'

Then drush updb will work.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

camhoward created an issue. See original summary.

mogtofu33’s picture

Assigned: Unassigned » mogtofu33
Status: Active » Needs work
Issue tags: +display_builder-1.0.0-beta8

Thanks for the report. No need to roll back, you can stay on beta7.

One update saves profiles before the update that converts the old "revert" setting has run, so it fails. Every update after it is skipped, and the same failure repeats on each run.

To fix it, run this, then drush updb:

drush php:eval '
$f = \Drupal::configFactory();
foreach ($f->listAll("display_builder.profile.") as $name) {
  $c = $f->getEditable($name);
  $r = $c->getOriginal("islands.state.revert", FALSE);
  if (is_array($r)) {
    $c->set("islands.state.revert", ($r["value"] ?? "label") !== "hidden")->save(TRUE);
  }
}'

The remaining updates should then pass. The update order will be fixed in beta8.

camhoward’s picture

Assigned: mogtofu33 » Unassigned
Status: Needs work » Active

Thanks, @mogtofu33! That worked great! All updates have completed. I appreciate the explanation and the quick fix. Thank you!

camhoward’s picture

Status: Active » Needs work

Oops! In my last post, I seem to have unintentionally changed the status and assignment settings which were updated by @mogtofu33 in comment #2. I'm setting it back to "Needs work" but can't re-add @mogtofu33 as the person to whom it is assigned. My apologies.

mogtofu33’s picture

Component: Main / Misc. » Code
Assigned: Unassigned » mogtofu33
Category: Support request » Bug report
Issue summary: View changes
Priority: Normal » Major

No worries for the status, happy the fix worked, I will update the issue with the solution in case someone else encounter that problem.

mogtofu33’s picture

Status: Needs work » Needs review
mogtofu33’s picture

Title: Failed: InvalidArgumentException after update to 1.0.0-beta7 » Failed: InvalidArgumentException after update (drush updatedb) to 1.0.0-beta7
mogtofu33’s picture

Status: Needs review » Reviewed & tested by the community

  • mogtofu33 committed def00a2c on 1.0.x
    fix: #3624051 Failed: InvalidArgumentException after update (drush...
mogtofu33’s picture

Assigned: mogtofu33 » Unassigned
Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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