Problem/Motivation
SelectA11yNG::exposedFormAlter() in select_a11y_ng_bef promotes the element to #type = 'select_a11y_ng' whenever !empty($form[$field_id]). With facets_filter from facets_exposed_filters, valueForm() returns an empty $form['value'] on the first build pass (before the backend query has run); the parent widget then populates #placeholder, which makes !empty() truthy and triggers the promotion. The element ends up with #input = TRUE but #options = [], so Form API rejects any submitted value and aborts the view before the second pass can rebuild it.
Default BEF widget does not reproduce because it never sets #type.
Steps to reproduce
View on a Search API index → exposed facets_filter → BEF widget = Select A11y NG → select any value → "The submitted value X in the … element is not allowed".
Proposed resolution
Guard the promotion on the presence of an existing #type (proof that valueForm() actually built the element):
- if (!empty($form[$field_id])) {
+ if (!empty($form[$field_id]['#type'])) {Issue fork select_a11y_ng-3587042
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
dpiet commentedComment #4
mably commentedComment #6
dpiet commented