Skip to content

graphql (magento 2.4.6-p4 ) - error when try to get cms page with not active status #38877

Open
@nikolaykravchenko

Description

@nikolaykravchenko

Preconditions and environment

  • Magento version: 2.4.6-p4

Steps to reproduce

  1. Install fresh magento 2.4.6-p4 with sample data.
  2. go to magento admin - Content - Pages
  3. edit "About us" page - set status "Disabled"
  4. send this graphQl query
{
 route(url: "about-us") {
   redirect_code
   relative_url
   type
 }
}

Expected result

Expected response

{
  "data": {
    "route": null
  }
}

Actual result

Actual response

{
  "errors": [
    {
      "message": "Internal server error",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "route"
      ]
    }
  ],
  "data": {
    "route": null
  }
}

Additional information

Also in magento log (exception.log) you can find the error:

GraphQL (2:3)
1: {
2:   route(url: "about-us") {
     ^
3:     redirect_code
 {"exception":"[object] (GraphQL\\Error\\Error(code: 0): No such entity. at /app/magento/vendor/webonyx/graphql-php/src/Error/Error.php:155)
[previous exception] [object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity. at /app/magento/vendor/magento/module-cms-graph-ql/Model/Resolver/DataProvider/Page.php:91)"} []

Release note

No response

Triage and priority

  • 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”.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Area: ContentComponent: 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: PR in progressReported on 2.4.6-p4Indicates 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