Log invalid elements as error

Created on 31 January 2023, almost 2 years ago
Updated 3 February 2023, almost 2 years ago

Problem/Motivation

When importing or encountering invalid WebformYaml, the module will log this event as a notice ("%title elements are not valid. @message").

An invalid WebformYaml makes the associated Webform unusable, uneditable and is not a normal condition. As such, it should be logged as an error, not as a notice.

This would also make it easier to spot invalid WebformYaml during an import, as error-messages stand out and can be searched for programmatically.

Steps to reproduce

  1. Create a Webform
  2. Export the config of this Webform
  3. Accidentally (or intentionally) invalidate the WebformYaml (the Yaml-String under .elements in the Config-Yaml)
  4. Import the Webform
  5. Visit the Webform. You will get the warning "Unable to display this webform. Please contact the site administrator."
  6. Go to /admin/reports/dblog. It will show no error.

Remaining tasks

Review patch.

User interface changes

API changes

Data model changes

✨ Feature request
Status

Fixed

Version

6.2

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany RobinCS

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

Comments & Activities

Production build 0.71.5 2024