Issue #3481590: Views EntityReference filter: Add functionality to switch from select to autocomplete widget when a max number of options reached
1 open thread
Closes #3481590
Merge request reports
Activity
added 1 commit
- 454b0731 - Change list_max to string to fix failing test
added 198 commits
-
454b0731...eab46c49 - 197 commits from branch
project:11.x
- 0f8c394f - Merge branch drupal:11.x into 3481590-views-entityreference-filter
-
454b0731...eab46c49 - 197 commits from branch
643 661 644 662 // Set the validated exposed input from the select list when not the all 645 663 // value option. 646 if ($this->options['widget'] == static::WIDGET_SELECT) { 664 if ($this->options['widget'] == static::WIDGET_SELECT && $form[$identifier]['#type'] !== 'entity_autocomplete') { Checking the field type without first checking whether
$form[$identifier]
exists or not causes a Warning that on a website with a lot of traffic (where I have applied this patch) has caused the logs to grow by 18GB (75 million lines). Here the warnings:- Warning: Undefined array key "location" in Drupal\views\Plugin\views\filter\EntityReference->validateExposed() (line 664 of core/modules/views/src/Plugin/views/filter/EntityReference.php)
- Warning: Trying to access array offset on null in Drupal\views\Plugin\views\filter\EntityReference->validateExposed() (line 664 of core/modules/views/src/Plugin/views/filter/EntityReference.php)
I think that by adding a simple isset() we avoid that problem.
changed this line in version 4 of the diff
added 1 commit
- b9dcbf43 - Added isset() method to prevent mass warnings
Please register or sign in to reply