Skip to content

Attribute is returned as aggregation in products query even if Use in Search Results Layered Navigation is set to no #33318

Closed
@t-heuser

Description

@t-heuser

Preconditions (*)

  1. Magento 2.4.2

Steps to reproduce (*)

  1. On any attribute set the setting "Use in Search Results Layered Navigation" to no (using price as example here)
  2. Execute the following graphql query:
query searchProducts {
    products(search: "") {
        aggregations {
            label
        }
    }
}

Expected result (*)

image

Actual result (*)

image

Whats the problem about it (*)

The huge problem is here that if you build filters based on the aggregation field the user will be able to filter the price. But if you try to filter via the price if it's disabled for layered navigation you'll receive the following error:
image


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: APIsIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneProject: GraphQLReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S1Affects critical data or functionality and forces users to employ a workaround.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions