Post update hook fails when config is already updated
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3261891. --> Reported by: [wells](https://www.drupal.org/user/2452278) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p><span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/allowed_formats/-/work_items/2733331" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/allowed_formats/-/work_items/2733331</a></span> introduced a post update hook for changing the configuration to a sequence but if the hook is run after the configuration has already been updated (by a config sync operation, for example) the execution will fail and remain stuck.</p> <h4>Example error message from database update script</h4> <p><code>InvalidArgumentException: The configuration property third_party_settings.allowed_formats.allowed_formats.0.0 doesn't exist. in Drupal\Core\Config\Schema\ArrayElement-&gt;get() (line 76 of /app/docroot/core/lib/Drupal/Core/Config/Schema/ArrayElement.php).</code></p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Update the post update hook to take no action on configuration that has already been updated (patch incoming).</p> > Related issue: [Issue #2733331](https://www.drupal.org/node/2733331)
issue