magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.45k stars 9.29k forks source link

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

Open nikolaykravchenko opened 2 months ago

nikolaykravchenko commented 2 months ago

Preconditions and environment

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

m2-assistant[bot] commented 2 months ago

Hi @nikolaykravchenko. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

m2-assistant[bot] commented 2 months ago

Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Bravo commented 2 months ago

Hi @nikolaykravchenko,

Thanks for your reporting and collaboration.

We have verified the issue in Latest 2.4-develop instance and the issue is reproducible.Kindly refer the screenshots.

Steps to reproduce

Screenshot 2024-06-27 at 10 23 07

Error in Exception Logs :

GraphQL (6:2)
5: {
6:  route(url: "enable-cookies") {
    ^
7:    redirect_code
 {"exception":"[object] (GraphQL\\Error\\Error(code: 0): No such entity. at /usr/local/var/www/magentok/magento2/vendor/webonyx/graphql-php/src/Error/Error.php:155)
[previous exception] [object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity. at /usr/local/var/www/magentok/magento2/app/code/Magento/CmsGraphQl/Model/Resolver/DataProvider/Page.php:91)"} []

Hence Confirming the issue.

Thanks.

github-jira-sync-bot commented 2 months ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-12302 is successfully created for this GitHub issue.

m2-assistant[bot] commented 2 months ago

:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

digitalrisedorset commented 2 months ago

@magento I am working on this