Skip to content

All attributes set to be used for search appear in layering navigation when there are no search results #4055

Closed
@addison74

Description

@addison74

Latest OM version cloned from the repository, DDEV + PHP 8.2 + MariaDB.

Steps to reproduce this issue:

  1. Set a few attributes with the option [Used in Layered Navigation] as Filtrable (with results)
  2. Search in the Frontend for a word that doesn't return any result
  3. Look at the layering navigation block. All your attributes appear with 0 results which is not a Magento correct behavior. If there are no results then no filterable attributes are displayed.

I investigated this issue in detail and I found that the changes made in this file

/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext/Collection.php

are causing the problem.

IMPORTANT NOTE: I moved forward and I used the file version before the changes and the problem no longer occurs, but I am not able to search for words that returned results before.

I compared the two versions and the changes are many so that I can get to the source of the problem.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions