Deleted elements still included in webform_product settings

Created on 1 December 2024, 4 months ago

Problem/Motivation

Looking at my config YML for a webform with the webform product handler in use, I noticed that a bunch of elements I deleted are still included in third_party_settings.webform_product. I don't think this is doing any real harm, but probably these elements should no longer be in the webform_product settings?

"I don't think this is doing any real harm" -- things I tried so far, to see if I could cause trouble:

  • I checked order totals, and they do not include any "top" attribute values from deleted elements.
  • I was able to add elements with identical machine names as previously deleted elements -- no errors in my browser or dblog, and the elements seemed to save just fine (regardless of element type).
  • When I re-added elements with identical machine names as previously deleted elements: If I set (or didn't set) a "top" price value, the "top" config attribute value in webform_product config was properly updated to whatever I set on the new version of those fields (i.e. a number, or empty '').

Steps to reproduce

Set up a webform with Webform product functionality (i.e. create a webform, add the "Order" elements that Webform Product requires (order ID, order status, order URL), add a webform product handler).
Add one or more elements to your webform -- no need to fill in price info, just add any elements, of any type.
Export the config YML for your new webform.
Remove an element (not one of the required "Order" fields, one of the elements you added in step 3).
Re-export your webform config YML.
Note that the deleted elements are still included in third_party_settings.webform_product.

Webform config example:

Proposed resolution

When webform elements are deleted, remove them from webform_product settings/config.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

3.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States alison

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

Comments & Activities

Production build 0.71.5 2024