First issue:
When using a list field as an exposed grouped filter with the checkbox to remember selections, I get the following error: "An illegal choice has been detected. Please contact the site administrator.":

illegal_choice

Filter settings:

list field settings 1
list field settings 2

Second issue:
When using a Boolean field as an exposed grouped filter with the checkbox to remember selections, I get the following error: "An illegal choice has been detected. Please contact the site administrator.":

boolean settings 1
boolean settings 2

Steps to reproduce:
- Import configs
- Add 6 nodes with filled fields (list_field_test: 2(Nodes) - Active, 2 - Inactive, 2 - Locked and test_status: 3 - Published, 3 - Unpublished)
- Go to path /test_list_view
- Select filters:
List Field Test (Inactive), Test Status (Not Published)
or
List Field Test (Inactive), Test Status (- Any -)
- Submit search
- Go to any path
- Again go to path /test_list_view

In different variations of the search query - we get an error:
An illegal choice has been detected. Please contact the site administrator.

CommentFileSizeAuthor
#17 2877061-17-store_group_input_value.patch1.14 KBandrewbelcher
#13 illegal-choice-in-grouped-exposed-filters-with-enabled-option-remember-2877061-13.patch2.98 KBBlacKICEUA
#11 illegal-choice-in-grouped-exposed-filters-with-enabled-option-remember-2877061-11.patch2.63 KBBlacKICEUA
#9 illegal-choice-in-grouped-exposed-filters-with-enabled-option-remember-2877061-9.patch4.01 KBBlacKICEUA
#6 illegal-choice-in-grouped-exposed-filters-with-enabled-option-remember-2877061-6.patch3.72 KBBlacKICEUA
#3 illegal-choice-in-grouped-exposed-filters-with-enabled-option-remember-2877061-2.patch3.62 KBBlacKICEUA
list_field_settings_2.png61.16 KBBlacKICEUA
boolean_settings_2.png35.59 KBBlacKICEUA
boolean_settings_1.png55.15 KBBlacKICEUA
list_filed_settings_1.png56.64 KBBlacKICEUA
illegal_choice.png22.97 KBBlacKICEUA
core.entity_form_display.node_.test_list_fields_node.default.yml1.74 KBBlacKICEUA
core.entity_view_display.node_.test_list_fields_node.default.yml1010 bytesBlacKICEUA
core.entity_view_display.node_.test_list_fields_node.teaser.yml588 bytesBlacKICEUA
field.field_.node_.test_list_fields_node.body_.yml575 bytesBlacKICEUA
field.field_.node_.test_list_fields_node.list_field_test.yml616 bytesBlacKICEUA
field.field_.node_.test_list_fields_node.test_status.yml609 bytesBlacKICEUA
field.storage.node_.list_field_test.yml537 bytesBlacKICEUA
field.storage.node_.test_status.yml323 bytesBlacKICEUA
node.type_.test_list_fields_node.yml336 bytesBlacKICEUA
views.view_.test_list_view.yml7.75 KBBlacKICEUA
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

BlacKICEUA created an issue. See original summary.

BlacKICEUA’s picture

Issue summary: View changes
BlacKICEUA’s picture

BlacKICEUA’s picture

Status: Active » Needs review

Status: Needs review » Needs work
BlacKICEUA’s picture

BlacKICEUA’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

Status: Needs review » Needs work
BlacKICEUA’s picture

Added new value with prefix _group to store selected group in a Grouped Filter.

Lendude’s picture

Status: Needs review » Needs work
Issue tags: -views, -exposed filter +Needs tests

@BlacKICEUA thanks for the report and the patch!

Fix could use some additional comments about what's going on. Also, this really needs some tests.

BlacKICEUA’s picture

BlacKICEUA’s picture

Status: Needs review » Needs work

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

andrewbelcher’s picture

Status: Needs work » Needs review
FileSize
1.14 KB

I think this can be simplified by just storing the group input value, rather the resulting filter value.

Still needs additional test, but marking for review to check against existing tests.