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.54k stars 9.32k forks source link

category list API return some null values #26792

Open blacktek opened 4 years ago

blacktek commented 4 years ago

Hello, when doing GET to /V1/categories?rootCategoryId=1 I've null fields in is_active (but the structure is correct)

{
  "id": 1,
  "parent_id": 0,
  "name": "Root Catalog",   
  "is_active": null,     #<---
  "position": 0,
  "level": 0,
  "product_count": 0,    
  "children_data": [
    {
      "id": 2,
      "parent_id": 1,
      "name": "Default Category",
      "is_active": true,
      "position": 1,
      "level": 1,
      "product_count": 1,
      "children_data": [
        {
          "id": 3,
          "parent_id": 2,
          "name": "Category",
          "is_active": true,
          "position": 1,
          "level": 2,
          "product_count": 2,
          "children_data": []
        }
      ]
    },

This problems happens only with search filter "rootCategoryId=1" that I use to get ALL the category trees. If I use "CategoryId=2" it works, But I need a way to get all category trees across all websites with one call.

Preconditions (*)

magento 2.3.2 and magento 2.3.3

Steps to reproduce (*)

Simply make a GET to https:///index.php/rest/V1/categories?rootCategoryId=1

Expected result (*)

no null values

Actual result (*)

The is_active: null cat_response_body1

m2-assistant[bot] commented 4 years ago

Hi @blacktek. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

@blacktek do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?


m2-assistant[bot] commented 4 years 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 4 years ago

Hello @blacktek

We have rechecked this in Magento 2.4-develop

We used swagger and the following query /rest/all/V1/categories The Response body is cat_response_body

{
  "id": 1,
  "parent_id": 0,
  "name": "Root Catalog",     #<---
  "is_active": null,     #<---
  "position": 0,
  "level": 0,
  "product_count": 0,     #<---
  "children_data": [
    {
      "id": 2,
      "parent_id": 1,
      "name": "Default Category",
      "is_active": true,
      "position": 1,
      "level": 1,
      "product_count": 1,
      "children_data": [
        {
          "id": 3,
          "parent_id": 2,
          "name": "Category",
          "is_active": true,
          "position": 1,
          "level": 2,
          "product_count": 2,
          "children_data": []
        }
      ]
    },
    {
      "id": 4,
      "parent_id": 1,
      "name": "root",
      "is_active": true,
      "position": 2,
      "level": 1,
      "product_count": 1,
      "children_data": [
        {
          "id": 5,
          "parent_id": 4,
          "name": "subcategory",
          "is_active": true,
          "position": 1,
          "level": 2,
          "product_count": 0,
          "children_data": []
        }
      ]
    }
  ]
}

As you can see there are values for name and product_count

However, the is_active still returns null

Can you please confirm if you have the same, or different, result on Magento 2.4-develop?

If the result is the same, we will have to update some issue description and then, confirm it

Thank you in advance

blacktek commented 4 years ago

Hello, good that an issue still exists on 2.4-develop too.

Unfortunately I'm unable to install a Magento 2.4-develop; this is something usually done by our sysadmins that have not enough time now.

Is this mandatory to proceed? it seems that some issue exist. Thank you

engcom-Bravo commented 4 years ago

Thank you for your quick response,

We will update the description and confirm the issue

magento-engcom-team commented 4 years ago

:white_check_mark: Confirmed by @engcom-Bravo Thank you for verifying the issue. Based on the provided information internal tickets MC-31314 were created

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.

m2-assistant[bot] commented 4 years ago

Hi @shikhamis11. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:


blacktek commented 4 years ago

Hello, will be provided a fix for the 2.3.3 and 2.3.4 releases too?

Thank you

shikhamis11 commented 4 years ago

@magento give me 2.4-develop instance

magento-engcom-team commented 4 years ago

Hi @shikhamis11. Thank you for your request. I'm working on Magento 2.4-develop instance for you

magento-engcom-team commented 4 years ago

Hi @shikhamis11, here is your Magento instance. Admin access: https://i-26792-2-4-develop.instances.magento-community.engineering/admin_1e73 Login: 15dc5973 Password: a675fccf5874 Instance will be terminated in up to 3 hours.

AfreenScarlet commented 4 years ago

@magento I am working on it.

AfreenScarlet commented 4 years ago

dmcdindia2020

m2-assistant[bot] commented 5 months ago

Hi @engcom-Bravo. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:


engcom-Bravo commented 5 months ago

Hi @blacktek,

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-05-21 at 11 52 35

The is_active: null.

Hence Confirming the issue.

Thanks

github-jira-sync-bot commented 5 months ago

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

m2-assistant[bot] commented 5 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.