"Sort by active state" implementation does not work

Created on 30 April 2025, 13 days ago

Problem/Motivation

The "Sort by active state" processor in the Facets module does not correctly order facet results based on their active state. The current implementation of the sortResults() method does not properly compare the active state of two items, resulting in facet items not being sorted as expected. This affects the usability of facets, as users may not see active filters grouped together or in the intended order.

Steps to reproduce

  1. Enable the Facets module and add a facet to a view or search page.
  2. Enable the "Sort by active state" processor for the facet.
  3. Select one or more facet items to make them active.
  4. Observe the order of facet items in the widget.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇭🇺Hungary mxr576 Hungary

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

Comments & Activities

  • Issue created by @mxr576
  • 🇭🇺Hungary mxr576 Hungary

    Okay, I have certainly overlooked something, sorry about the noise - I was very surprising being the first one spotting this, but now I know why.

Production build 0.71.5 2024