The views_filters_summary
module does not correctly display the summary for exposed filters when using a Product type filter (which is an entity bundle) from the Drupal Commerce module.
This happens because the filter plugin used by Commerce for its entity bundles is commerce_entity_bundle
, but this plugin ID is not handled in the switch
statement within the buildFilterDefinition()
method in ViewsFiltersSummary.php
. The current code only accounts for the generic bundle
case, causing Commerce product type filters to be ignored.
commerce_entity_bundle
plugin.The solution is to add a new case to handle the commerce_entity_bundle
plugin ID alongside the existing bundle
case in the buildFilterDefinition()
method.
File: src/Plugin/views/area/ViewsFiltersSummary.php
// Around line 688
case 'bundle':
if (is_array($original_value)) {
// Around line 688
case 'commerce_entity_bundle':
case 'bundle':
if (is_array($original_value)) {
This simple addition makes the module compatible with Commerce's entity bundle filters without affecting existing functionality.
Closed: duplicate
3.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.