'Facets to include' lists Summary facet that might not exist

Created on 21 December 2021, almost 3 years ago
Updated 24 February 2023, almost 2 years ago

Problem/Motivation

\Drupal\facets_block\Plugin\Block\FacetsBlock::getAvailableFacets() includes the following code:

    if ($this->moduleHandler->moduleExists('facets_summary')) {
      $available_facets['facets_summary_block:summary'] = $this->t('Summary');
    }

However, there might not be a facet summary with an id 'summary'. This results in the following text on the page:

This block is broken or missing. You may be missing content or you might need to enable the original module.

Proposed resolution

Show the Facet summary blocks that actually exist.

Remaining tasks

  1. Write a patch
  2. Review
  3. Commit

User interface changes

'Facets to include' lists Facet summary items that exist.

API changes

None.

Data model changes

None.

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇳🇱Netherlands idebr

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇬🇧United Kingdom alexp999

    This commit, included with 8.x-1.05 has caused unnecessarily long titles on the front end.

    I am getting facets titled as something like "Views: Page Title: Page : Index : Facet Title"

    It should just be facet name when outputing to the front end block, it doesn't need the facet source in the title.

Production build 0.71.5 2024