Broken webform configuration after update.

Created on 20 September 2023, over 1 year ago

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.

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇪🇸Spain Jose Reyero

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024