I am using webform 8.x-5.0-beta12. I randomly got issue when I update the webform settings, please see the attached screenshots.

An illegal choice has been detected. Please contact the site administrator

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yi_jiang created an issue. See original summary.

jrockowitz’s picture

Did you execute all pending database updates?

Try running `drush webform-repair` and see if the error is resolved.

yi_jiang’s picture

PHP Fatal error: Class 'Cache' not found in /var/www/html/modules/webform/drush/webform.drush.inc on line 697\

after drush webform-repair

------------
This problem causes the form settings cannot save.

jrockowitz’s picture

Can you also run `drush cache clear`.

yi_jiang’s picture

drush cr
Cache rebuild complete.

did several times, no issue.

yi_jiang’s picture

commit out line 697 in webform.drush.inc, drush form-repair running no issue, however the form setting still got same issue as I mentioned in the top, and cannot save.

I think it only happened after I did webform update recently.

yi_jiang’s picture

Redownload and switch dev version 8.x-5.0-beta12+11-dev solved the issue, It might be problem from webform update.

The other issue I got is to disable webform, please see: https://www.drupal.org/node/2874153

jrockowitz’s picture

Status: Active » Closed (cannot reproduce)

Next time this happens, please upload your webform.settings.yml and we can try to figure out which setting is throwing the error.

yi_jiang’s picture

where is webform.settings.yml file?

vacho’s picture

Hi, #7 doesn't work for me, and it is my yml
mmm it Form worked fine 2 months ago and after I update the webform module it fail when save settings.

agencia:
'#type': entity_select
'#title': Agencia
'#target_type': node
'#selection_handler': 'default:node'
'#selection_settings':
target_bundles:
agencia: agencia
sort:
field: title
direction: ASC
nombre_o_razon_social:
'#type': textfield
'#title': 'Nombre o Razon Social'
'#title_display': inline
tipo_de_reclamante:
'#type': select
'#title': 'Tipo de reclamante'
'#options':
'Persona natural': 'Persona natural'
'Persona jurídica': 'Persona jurídica'
'Apoderdado persona natural': 'Apoderado persona natural'
tipo_documento:
'#type': select
'#title': 'Tipo documento'
'#options':
CI: CI
RUN: RUN
NIT: NIT
identificacion:
'#type': textfield
'#title': Identificación
extendido:
'#type': select
'#title': Extendido
'#options':
BE: Beni
CB: Cochabamba
CH: Chuquisaca
LP: 'La Paz'
OR: Oruro
PA: Pando
PO: Potosi
SC: 'Santa Cruz'
TJ: Tarija
nombre_del_representante_o_apoderado:
'#type': textfield
'#title': 'Nombre del Representante o Apoderado'
no_de_testimonio_de_poder:
'#type': textfield
'#title': 'Nº de Testimonio de Poder'
direccion:
'#type': textfield
'#title': Dirección
'#description': 'Ciudad, Zona, Calle-Nº, Edificio, Piso-Nº'
telefono_domicilio:
'#type': textfield
'#title': 'Teléfono domicilio'
celular:
'#type': textfield
'#title': Celular
correo_electronico:
'#type': email
'#title': 'Correo electrónico'
fecha_del_hecho_que_motiva_el_reclamo:
'#type': date
'#title': 'Fecha del hecho que motiva el reclamo'
'#date_date_format': 'l d F Y'
moneda:
'#type': select
'#title': Moneda
'#options':
Bs: Bolivianos
USD: 'Dólares Americanos'
monto:
'#type': textfield
'#title': Monto
descripcion_del_reclamo_y_o_solicitud:
'#type': textarea
'#title': 'Descripción del reclamo y/o solicitud'
'#rows': '5'

vacho’s picture

mmm

This problem has been solved for me when Desactivate "Draft Settings" at settings of form

Odiak’s picture

#11 worked for me too