ConfigValueException: ***** key contains a dot which is not supported. in Drupal\Core\Config\ConfigBase->validateKeys()

Created on 6 April 2021, about 4 years ago
Updated 2 December 2024, 4 months ago

Problem/Motivation

When trying to add an option limit with the webform_options_limit module for a field that contains options containing a dot, the limit can not be saved.

ConfigValueException: ***** key contains a dot which is not supported. in Drupal\Core\Config\ConfigBase->validateKeys() 

The form then shows a bunch of noticed in the frontend as well:

Notice: A non well formed numeric value encountered in Drupal\webform_options_limit\Plugin\WebformHandler\OptionsLimitWebformHandler->disableOptionsElement() (line 709 of modules/contrib/webform/modules/webform_options_limit/src/Plugin/WebformHandler/OptionsLimitWebformHandler.php).

Warning: Illegal string offset '9.00 - 12.00' in Drupal\webform_options_limit\Plugin\WebformHandler\OptionsLimitWebformHandler->disableOptionsElement() (line 709 of modules/contrib/webform/modules/webform_options_limit/src/Plugin/WebformHandler/OptionsLimitWebformHandler.php).

Notice: Array to string conversion in Drupal\webform_options_limit\Plugin\WebformHandler\OptionsLimitWebformHandler->disableOptionsElement() (line 709 of modules/contrib/webform/modules/webform_options_limit/src/Plugin/WebformHandler/OptionsLimitWebformHandler.php).

Warning: Invalid argument supplied for foreach() in Drupal\webform\Plugin\WebformElement\OptionsBase::processOptionsProperties() (line 264 of modules/contrib/webform/src/Plugin/WebformElement/OptionsBase.php).

Steps to reproduce

  1. Create a webform with an select field.
  2. Add an option containing a dot.
  3. Enable the webform_options_limit module
  4. Try to add an option limit for the select field via the webform handlers.
  5. The option limit for the value containing a dot is not saved and the log contains an error.

Proposed resolution

I saw a similar issue with a fix in #2875371: Can't Add Email Handler w/Select "Send To" β†’ , maybe we can do something like that?

Remaining tasks

User interface changes

-

API changes

-

Data model changes

-

πŸ› Bug report
Status

Needs review

Version

6.2

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands seanB Netherlands

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.

Production build 0.71.5 2024