Can't store addresses when using select field with value list
|Priority:||Should have||Due date:|
While trying to add the gender field from tt_address to the forms in pi4 I stumbled over the following error:
You can define a select box with a value list, which is working fine in the edit/create-form:
type = select
m = Herr
f = Frau
However, when you store the address, pi4 tries to fetch the label for the selected value from the database, which fails as no table is defined here intentionally.
Steps to reproduce:
To reproduce this, add the following config to your TS, add the marker ###FIELD_GENDER### to the pi4-template, log in, and try to create a new address in checkout process.
One solution I saw on some systems is, to create a static table that contains nothing but the value/label-list. A cleaner solution is done in the attached patch: If the select-field has no table defined, but a value list, use the value list from TS-configuration to get the label. It also throws a more descriptive exception than TYPO3 does, if no values are configured at all.
|duplicated by commerce - Bug #8112: 'NO entry in the $TCA-array' if using an additonal <selec...||Closed||2010-06-09|
Fixed #26552: Can not store addresses when using select field with value list (Thanks to Michael Knabe)