magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

category list API return some null values

Open blacktek opened this issue 5 years ago • 17 comments

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://<SHOP_HOSTNAME>/index.php/rest/V1/categories?rootCategoryId=1

Expected result (*)

no null values

Actual result (*)

The is_active: null cat_response_body1

blacktek avatar Feb 10 '20 11:02 blacktek

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

  • [ ] Summary of the issue
  • [ ] Information on your environment
  • [ ] Steps to reproduce
  • [ ] Expected and actual results

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?

  • [ ] yes
  • [ ] no

m2-assistant[bot] avatar Feb 10 '20 11:02 m2-assistant[bot]

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:

  • [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • [ ] 5. Add label Issue: Confirmed once verification is complete.

  • [ ] 6. Make sure that automatic system confirms that report has been added to the backlog.

m2-assistant[bot] avatar Feb 10 '20 12:02 m2-assistant[bot]

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

engcom-Bravo avatar Feb 10 '20 13:02 engcom-Bravo

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

blacktek avatar Feb 10 '20 13:02 blacktek

Thank you for your quick response,

We will update the description and confirm the issue

engcom-Bravo avatar Feb 10 '20 14:02 engcom-Bravo

: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.

magento-engcom-team avatar Feb 10 '20 14:02 magento-engcom-team

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:

  • [ ] 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 2. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • [ ] 3. If the issue is not relevant or is not reproducible any more, feel free to close it.


m2-assistant[bot] avatar Feb 10 '20 17:02 m2-assistant[bot]

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

Thank you

blacktek avatar Feb 11 '20 07:02 blacktek

@magento give me 2.4-develop instance

shikhamis11 avatar Jul 20 '20 06:07 shikhamis11

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

magento-engcom-team avatar Jul 20 '20 06:07 magento-engcom-team

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.

magento-engcom-team avatar Jul 20 '20 06:07 magento-engcom-team

@magento I am working on it.

AfreenScarlet avatar Oct 10 '20 09:10 AfreenScarlet

#dmcdindia2020

AfreenScarlet avatar Oct 10 '20 09:10 AfreenScarlet

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:

    1. Add/Edit Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
      - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
    1. If the issue is not relevant or is not reproducible any more, feel free to close it.

m2-assistant[bot] avatar May 21 '24 05:05 m2-assistant[bot]

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

  • Simply make a GET to https://<SHOP_HOSTNAME>/index.php/rest/V1/categories?rootCategoryId=1
Screenshot 2024-05-21 at 11 52 35

The is_active: null.

Hence Confirming the issue.

Thanks

engcom-Bravo avatar May 21 '24 06:05 engcom-Bravo

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

github-jira-sync-bot avatar May 21 '24 07:05 github-jira-sync-bot

: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.

m2-assistant[bot] avatar May 21 '24 07:05 m2-assistant[bot]