The attached patch fixes a boolean type mismatch in the facets_summary module's Views plugins.
Problem: The label_display option was being compared against BlockPluginInterface::BLOCK_LABEL_VISIBLE (a string constant, "visible") in three places. This caused a type mismatch — the checkbox form element stores a boolean, but the default value and comparisons expected the string "visible".
Three files changed:
1. FacetsSummaryViewsPluginTrait.php
- Removed the unused BlockPluginInterface import
- Changed #default_value from ($this->options['label_display'] === BlockPluginInterface::BLOCK_LABEL_VISIBLE) to !empty($this->options['label_display'])
- Removed #return_value => BlockPluginInterface::BLOCK_LABEL_VISIBLE (so the checkbox returns a proper boolean)
- Same !empty() fix applied when building the block's #configuration array
2. FacetsSummaryArea.php — Changed the default for label_display from BlockPluginInterface::BLOCK_LABEL_VISIBLE to TRUE
3. FacetsSummaryFilter.php — Same default value fix as above
In short: the patch makes the label_display option consistently use a boolean (TRUE/FALSE) instead of mixing in the string constant "visible", which prevented the "Display block title" checkbox from working correctly in Views.
| Comment | File | Size | Author |
|---|---|---|---|
| facets_summary-label_display-boolean-type-mismatch-3.0.2.patch | 3.45 KB | scotwith1t |
Comments