Settings stored in ThirdPartySettings can become incorrect

Created on 16 January 2023, almost 2 years ago
Updated 19 January 2023, almost 2 years ago

The ThirdPartySettings can be incorrect.
For example:

"" => array:2 [
    "top" => ""
    "options" => array:3 [
      66 => "66"
      20 => "20"
      30 => "30"
    ]
  ]

So the key is empty.

This can happen when the new select component is created in a way that it is submitted without a title. Webform returns an error about supplying a title and key, but I think that by then this bad entry is already created. Furthermore even after specifying the values, the code will save it to this empty keyed section and not the right section, so when editing the component the price values are not correct.

This can fix itself though when the component is opened again, and resaved.

The other issue is that the element's data is not removed from the ThirdPartySettings when they are deleted, so if there are a lot of editing on the webform, data can stay behind. It is a smaller issue, as a new element with the same machine name will replace the data, and otherwise it only considers the submitted data.

🐛 Bug report
Status

Needs work

Version

3.0

Component

Code

Created by

🇭🇺Hungary nagy.balint

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Status changed to Needs work almost 2 years ago
Production build 0.71.5 2024