Problem/Motivation
After running commerce_webform_order_post_update_1() some of the resulting webforms have completely messed up configuration. Sections are broken, fields get translated to the wrong language, some field types are gone...
Steps to reproduce
Just run the update having some existing webforms with the 'commerce_webform_order' plug-in enabled.
Not sure if it has anything to do but on this site we have multilingual webforms and also some webform templates.
Proposed resolution
It looks like the updating mechanism for the plug-in settings is not safe for language or configuration overrides.
Since webforms are configuration entities, instead of Webform::load(...)->save() we should be using ConfigFactory:getEditable(...)->save()
Patch will follow.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3388517-broken-webform-configuration-01.patch | 1.44 KB | jose reyero |
Comments
Comment #2
jose reyero commentedThis patch should fix it.
Not sure whether the update could be simplified just using the configuration data... However I've kept the whole plug-in-settings + defaults update code just to make sure the resulting settings are exactly the same....
Comment #4
facine commentedFixed, thank you very much :)!