The submitted value [value] in the [name] element is not allowed.

Created on 8 May 2024, about 2 months ago
Updated 9 May 2024, about 2 months ago

This might be an issue using select2 as the widget via BEF.

Problem/Motivation

I have been trying to get up and running with views + facets but it seems like selecting any option from a facet gives me the following error:

The submitted value [value] in the [name] element is not allowed.

Steps to reproduce

  • Download facets 3.0-dev
  • Enable Facets & Facets exposed filters (Experimental)
  • Configure Facet source to be "Views exposed filters"
  • Add facet to the facet source
  • On your view expose the facet via the "Facet" field
  • Configure the field widget via BEF (in my case I am using Select2)
  • View your facet and try to select an option
  • Error is thrown

Proposed resolution

Looking at the issue the problem seems to be that the "options" key is empty at the time the data is sent, I'm not sure why this is, I have tried multiple widgets but they all give different errors.

Remaining tasks

To fix the problem :D

---

Does anyone have a working views + facets + ajax using v 3.0 ?

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom 3li U.K. πŸ‡¬πŸ‡§

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

Comments & Activities

  • Issue created by @3li
  • Same problem here. Using std checkboxes it's working but not with Select2.

  • πŸ‡¬πŸ‡§United Kingdom 3li U.K. πŸ‡¬πŸ‡§
  • πŸ‡¬πŸ‡§United Kingdom 3li U.K. πŸ‡¬πŸ‡§

    Think I found the problem.
    We should be running an extra process facets_exposed_filter_remove_validation (facets/modules/facets_exposed_filters/src/Plugin/views/FacetsViewsPluginTrait.php) which is meant to unset($element["#needs_validation"]);

    However for some reason when using select2 nothing gets created and thus this process does not get attached or run, meaning that validation is still enabled.

Production build 0.69.0 2024