MDVA-40601: Unable to retrieve data about category changed by scheduled update via GraphQL

The MDVA-40601 Adobe Commerce quality patch fixes the issue where users get an error when getting information about category changed by scheduled update through GraphQL. This patch is available when the Quality Patches Tool (QPT) 1.1.3 is installed. The patch ID is MDVA-40601. Please note that the issue is scheduled to be fixed in Adobe Commerce 2.4.4.

Affected products and versions

The patch is created for Adobe Commerce version:

Adobe Commerce (all deployment methods) 2.3.3 and 2.4.2

Compatible with Adobe Commerce versions:

Adobe Commerce (all deployment methods) 2.3.1 - 2.4.2-p2

NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe Commerce version, update the magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.

Issue

Users get an error when trying to retrieve information about category changed by scheduled update via GraphQL.

Steps to reproduce:

  1. Set up a category structure with a sub-category as given below:

    code language-graphql
    
    - Root
     - Some category
          - Some child category
    
  2. Execute GraphQL query with “Some Category” ID 49.

    code language-graphql
    
     query {
      category(id: 49) {
       name
       children {
         name
        }
      }
    }
    

    Result:

    code language-graphql
    
     {
       "data": {
         "category": {
           "name": "Some category",
           "children": [
             {
               "name": "Some child category"
             }
           ]
         }
       }
     }
    
    
  3. Create a schedule update for “Some Category” with a different category name.

  4. Wait for the schedule update to get activated.

  5. Execute the same query as given above.

Expected results:

You receive the same result but with the updated category name.

Actual results:

You get the following error:


{
  "errors": [
    {
      "debugMessage": "uasort() expects parameter 1 to be array, string given",
      "message": "Internal server error",
      "extensions": {
        "category": "internal"
      },
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "category"
      ]
    }
  ],
  "data": {
    "category": null
  }
}

Apply the patch

To apply individual patches, use the following links depending on your deployment type:

To learn more about quality patches for Adobe Commerce, refer to:

For info about other patches available in QPT, refer to the Patches available in QPT section.

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a