- Issue created by @bhogue
- π©πͺGermany rauch
Same on my site.
Browser Console:
"
Ein AJAX-HTTP-Fehler ist aufgetreten.
HTTP-RΓΌckgabe-Code: 200
Debugging information follows.
Statustext: parsererror
Antworttext:
Fatal error: Declaration of Drupal\facets\Plugin\better_exposed_filters\filter\Facets::isApplicable($filter = null, array $filter_options = []) must be compatible with Drupal\better_exposed_filters\Plugin\better_exposed_filters\filter\FilterWidgetBase::isApplicable(mixed $filter = null, array $filter_options = []): bool in /var/www/html/web/modules/contrib/facets/src/Plugin/better_exposed_filters/filter/Facets.php on line 74" - πΊπΈUnited States smustgrave
So those errors appear to be from facets and select2.
Maybe we can put some defensive code in but that appears to be the source
- πΊπΈUnited States smustgrave
In 7.0.x we added typehints since minimum php requirement is 8.1
Wonder if that's the issue.
- πΊπ¦Ukraine zegmant
tried to set select2 in bef via direct editing of views config (for field_country_target_id filter)
exposed_form: type: bef options: submit_button: Apply reset_button: true reset_button_label: Reset exposed_sorts_label: 'Sort by' expose_sort_order: true sort_asc_label: Asc sort_desc_label: Desc text_input_required: 'Select any filter and click on Apply to see results' text_input_required_format: null bef: general: autosubmit: false autosubmit_exclude_textfield: false autosubmit_textfield_delay: 500 autosubmit_hide: false input_required: false allow_secondary: false secondary_label: 'Advanced options' secondary_open: false reset_button_always_show: false sort: plugin_id: default filter: combine: plugin_id: default field_country_target_id: plugin_id: bef_select2 advanced: placeholder_text: 'Country' rewrite: filter_rewrite_values: '' filter_rewrite_values_key: false collapsible: false collapsible_disable_automatic_open: false is_secondary: false
when viewing the page frontend it goes into the same error:
Fatal error: Declaration of Drupal\select2\Plugin\better_exposed_filters\filter\Select2::defaultConfiguration() must be compatible with Drupal\better_exposed_filters\Plugin\better_exposed_filters\filter\FilterWidgetBase::defaultConfiguration(): array in /var/www/unh-new/web/modules/contrib/select2/src/Plugin/better_exposed_filters/filter/Select2.php on line 21
(but i see no logs in the watchdog)
- πΊπΈUnited States smustgrave
FilterWidgetBase::defaultConfiguration()
. if you remove the typehint does it work? - πΊπΈUnited States smustgrave
if you go into the file and change
public function defaultConfiguration(): array {
topublic function defaultConfiguration() {
ideally the other modules would update for modern typehints but know that's the case.
- πΊπ¦Ukraine zegmant
i'm not programmer, just advanced drupal user. can you instruct wher to find the file?
- πΊπ¦Ukraine zegmant
found, better_exposed_filters/src/Plugin/better_exposed_filters/filter/FilterWidgetBase.php line 74
changed.
no changes, the same error - πΊπΈUnited States smustgrave
Left a comment on β¨ BEF 7.0 compatible RTBC also
- Merge request !100Issue #3469224: Nondescript error when trying to edit Exposed Form Style settings in view β (Merged) created by smustgrave
- Status changed to Needs review
6 months ago 2:20am 29 August 2024 - πΊπΈUnited States smustgrave
Not thrilled but if other modules are going to break I can drop the typehint here till it's mandatory.
- πΊπΈUnited States smustgrave
Don't mind reverting this so other contrib modules will function. But when D11 only branch is started may get added back.
- Status changed to Fixed
6 months ago 10:23pm 4 September 2024 -
smustgrave β
committed b2a0c77b on 7.0.x
Issue #3469224: Nondescript error when trying to edit Exposed Form Style...
-
smustgrave β
committed b2a0c77b on 7.0.x
Automatically closed - issue fixed for 2 weeks with no activity.