Skip to content

[2.4] Elasticsearch Graphql Bundleproducts index their children url keys if children are visible. #33933

Open
@Hexmage

Description

@Hexmage

Preconditions (*)

  1. Magento 2.4.2
  2. Elasticsearch 7

Steps to reproduce (*)

  1. Create a simple product, set visibility to catalog/search and url_key to 'simple'
  2. Create a bundle product, set visibility to catalog/search and url_key to 'bundle'
  3. Assign the simple product to the bundle product.
  4. Reindex so products are set in elastic
  5. Request the following GraphQl call:
    Note: This issue observed for Grouped Product as well. If simple product is assigned to Grouped product and searching using url_key eq: simple product url_key returns both Simple and Grouped product
query products {
     products(
            filter:{
		    url_key:{
                        eq:"simple"
                    }
	   }
     ){ items {
           url_key
     }
}

Expected result (*)

"data": {
        "products": {
            "items": [
                {
                    "url_key": "simple",
                }
            ]
        }
    }
}

Actual result (*)

{
    "data": {
        "products": {
            "items": [
                {
                    "url_key": "bundle",
                },
                {
                    "url_key": "simple",
                }
            ]
        }
    }
}

The Issue

Bundle product index many of their children's attributes. But it is also indexing the url_key. Which means that bundle products match, when filtering on url_key, on their own url_key and on the url_key of their children. This shouldn't happen because the only relevant url_key for the bundle is its own url_key.


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: ProductComponent: GraphQLGraphQLIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: ready for devReported on 2.4.2Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions