Problem/Motivation
#2733331: Store as sequence 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.
Example error message from database update script
InvalidArgumentException: The configuration property third_party_settings.allowed_formats.allowed_formats.0.0 doesn't exist. in Drupal\Core\Config\Schema\ArrayElement->get() (line 76 of /app/docroot/core/lib/Drupal/Core/Config/Schema/ArrayElement.php).
Proposed resolution
Update the post update hook to take no action on configuration that has already been updated (patch incoming).
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3261891-2.patch | 877 bytes | wells |
Issue fork allowed_formats-3261891
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
Comment #2
wellsPatch attached based on proposed resolution.
Comment #3
yuseferi commentedNice!
worked for me
Comment #4
jklmnop commented#2 worked for me too.
Comment #5
kjwhite commentedTested patch in #2 successfully.
Comment #6
mvogel commented+1
Comment #7
duaelfrNice patch! Thanks :)
Comment #8
abu-zakham commented+1
Comment #9
artusamakI can also confirm that #2 is fixing the issue. Thank you for the patch.
Comment #11
dwwAnother +1 for the RTBC. Hit exactly this problem and patch #2 solves it. I can't find anything to complain about for the patch: comment is clear, code looks good. Confirmed it solves the problem. I don't know that we need an automated test for this, I think we should just fix it.
If I were a maintainer here, I'd remove credit from @Sashaz for clicking the link to create an issue fork when there's already a patch and doing nothing else with it. Creating an MR would be pointless for such a small patch. IMHO, this looks like someone trying to game the credit system without doing any meaningful contribution...
Anyway, thanks @wells for opening the issue and the nice patch, and everyone else who actually tested this to confirm it's working!
Cheers,
-Derek
Comment #13
nord102Thanks for catching this and for the patch @wells. Thanks everyone else for all of the feedback.
Comment #15
eelkeblokFor those stumbling upon this after the fact, one puzzling aspect of this is that our deployments always do updates *first* and only then do a config import, so this really shouldn't happen. It did anyway.