Moving a category breaks GraphQL filter by URL path #39183
Labels
Issue: ready for confirmation
Reported on 2.4.7-p1
Indicates original Magento version for the Issue report.
Preconditions and environment
Steps to reproduce
Create a category tree as follows:
Parent 1 (url_path:
parent-1
) -> Child 1 (url_path:parent-1/child-1
)Parent 2 (url_path:
parent-2
)Send a GraphQL query (in my case with header
store: store_code
):Expected and actual result: success response.
In admin area, move category Parent 1 into Parent 2:
Parent 2 (url_path:
parent-2
) -> Parent 1 (url_path:parent-2/parent-1
) -> Child 1 (url_path:parent-2/parent-1/child-1
)Send a GraphQL query (in my case with header
store: store_code
):Expected result
Expected result:
Moving a category correctly saves the saves all attributes so that everything keeps working, including GraphQL
Specifically here: a successful GraphQL response
Actual result
GraphQL error message
"message": "No category with the provided
category_url_pathwas found"
for a category thatAdditional information
The reason behind this problem is that the
url_path
attribute values are correctly generated for the store but not for the default scope.The example for an affected category on the sample data in vanilla Magento after category "Men" was moved into "Gear":
As a result, there is a GraphQL error message. Adding a value for store 0 fixes the problem.
Here's an SQL query that shows which categories are affected after a move (has value for store ID 1 and no value for store ID 0):
Resaving the affected category (in admin area or programmatically) regenerates
url_path
and it starts working again.Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: