Select lists in plugin config should allow for empty values if field is not required

Created on 27 August 2024, 3 months ago
Updated 10 September 2024, 2 months ago

Problem/Motivation

Reported by @rclemings in Slack:

I've updated ECA from v1 to v2 on my local development site and ran "drush eca:update" because it seemed like a good idea. I got a lot of errors:

 [error]  The submitted value  in the Language element is not allowed.
 [error]  The submitted value  in the Language element is not allowed.
 [error]  The submitted value  in the Language element is not allowed.
 [error]  The submitted value  in the Language element is not allowed.
 [error]  The submitted value  in the Language element is not allowed.
 [error]  The submitted value  in the Language element is not allowed.
 [error]  Message: action "Entity: create new" (Create address profile): The submitted value //
in the /Language/ element is not allowed.
 [error]  Message: action "Entity: create new" (Create membership profile): The submitted value
// in the /Language/ element is not allowed.
 [error]  Message: action "Entity: create new" (Create member directory data profile): The
submitted value // in the /Language/ element is not allowed.

(That's referring to profiles from the Profile contrib module.)

The language element with v1 was just a text box, which I've always left empty. Running "drush eca:update" yields no errors.
On v2 it's a dropdown with choices "English," "Interface language," and "Defined by token." I suppose I can just use English since this is not a multilanguage site.

My question though: Since there were no errors with v1, it must OK to leave "Language" blank. But should there be some kind of update hook, or documentation, to deal with that element when upgrading to v2?
I'm also not sure how to find the places what's triggering the first six of those errors (the last three are easy).

πŸ› Bug report
Status

Fixed

Version

2.1

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

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

Comments & Activities

Production build 0.71.5 2024