TypeError when changing view filter identifier

Created on 26 May 2023, almost 2 years ago

Problem/Motivation

An error occurs if I change the exposed filter identifier

TypeError: Cannot access offset of type string on string in Drupal\views\Plugin\views\filter\Date->acceptExposedInput() (line 153 of /var/www/html/web/core/modules/views/src/Plugin/views/filter/Date.php)
#0 /var/www/html/web/core/modules/views/src/Form/ViewsExposedForm.php(191): Drupal\views\Plugin\views\filter\Date->acceptExposedInput(Array)
#1 [internal function]: Drupal\views\Form\ViewsExposedForm->submitForm(Array, Object(Drupal\Core\Form\FormState))
#2 /var/www/html/web/core/lib/Drupal/Core/Form/FormSubmitter.php(114): call_user_func_array(Array, Array)
#3 /var/www/html/web/core/lib/Drupal/Core/Form/FormSubmitter.php(52): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object(Drupal\Core\Form\FormState))
#4 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(609): Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object(Drupal\Core\Form\FormState))
#5 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(325): Drupal\Core\Form\FormBuilder->processForm('views_exposed_f...', Array, Object(Drupal\Core\Form\FormState))
#6 /var/www/html/web/core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php(134): Drupal\Core\Form\FormBuilder->buildForm('\\Drupal\\views\\F...', Object(Drupal\Core\Form\FormState))

Steps to reproduce

Import the attached webform and view configs. Submit the webform twice, once with a Paid Date, once without. In the view, you should be able to select "Paid" or "Unpaid" in the grouped exposed filter, and you should only see one row. Instead, you get an error when clicking to Apply the filter.

The errors go away if the "Filter identifier" is set to "webform_submission_value"

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

5.0

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024