Skip to content

REST API: catalogCategoryLinkManagement error if same product in multiple subcategories of parent #30461

Closed
@nthurston

Description

@nthurston

Preconditions (*)

  1. Magento 2.4-develop

Steps to reproduce (*)

  1. Create a category with 2 sub categories
    image
  2. Assign same product to both sub categories
    image
  3. Call /V1/categories/{categoryId}/products with the parent category id

Expected result (*)

  1. List of all products assigned to parent category

Actual result (*)

  1. "Internal Error. Details are available in Magento log file. Report ID: webapi-5f8579e37db54"
    image

  2. main.CRITICAL: Report ID: webapi-5f8579e37db54; Message: Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "1" already exists. {"exception":"[object] (Exception(code: 0): Report ID: webapi-5f8579e37db54; Message: Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "1" already exists. at /var/www/html/magento2dev/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php:208, Exception(code: 0): Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "1" already exists. at /var/www/html/magento2dev/lib/internal/Magento/Framework/Data/Collection.php:408)"} []

Notes

  1. It should be noted the same thing happens if you assign a product to a parent category and a sub category of that parent.

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CatalogFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneReported on 2.4.0Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S1Affects critical data or functionality and forces users to employ a workaround.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions