magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

The parent product doesn't have configurable product options.

Open usamahabib786 opened this issue 7 years ago • 39 comments

Preconditions (*)

PHP 7.2 MySQL CE 5.6.30 Magento 2.3

Steps to reproduce (*)

1.Create a Configurable product, Set the configurable attribute and Link the simple products to the configurable product using BULK API endpoint: rest/async/bulk/V1/configurable-products/bySku/child 2. Input POST [ { "sku": "parentSku", "childSku": "ChildNo1Sku" }, { "sku": "parentSku", "childSku": "ChildNo2Sku" }, { "sku": "parentSku", "childSku": "ChildNo3Sku" } ]

RESPONSE: { "bulk_uuid": "d934bf6f-bc8f-4189-b6b9-9a85896c8641", "request_items": [ { "id": 0, "data_hash": null, "status": "accepted" }, { "id": 1, "data_hash": null, "status": "accepted" }, { "id": 2, "data_hash": null, "status": "accepted" } ], "errors": false }

Expected result (*)

1.Mass update for Topic async.V1.configurable-products.sku.child.POST should be updated successfully.

Actual result (*)

  1. Mass update for Topic async.V1.configurable-products.sku.child.POST failed.
  2. On checking the status of bulk uuid response is: { "operations_list": [ { "id": 298, "status": 3, "result_message": "The parent product doesn't have configurable product options.", "error_code": 0 }, { "id": 299, "status": 3, "result_message": "The parent product doesn't have configurable product options.", "error_code": 0 }, { "id": 300, "status": 3, "result_message": "The parent product doesn't have configurable product options.", "error_code": 0 } ], "user_type": 1, "bulk_id": "d934bf6f-bc8f-4189-b6b9-9a85896c8641", "description": "Topic async.V1.configurable-products.sku.child.POST", "start_time": "2019-01-17 10:31:04", "user_id": 1, "operation_count": 3 } 3.image

NOTES(*)

Please not that when i am trying to link the simple products to the configurable product with restApi endpoint magento 2.3 which is rest/V1/configurable-products/:sku/child ##Input: {"childSku":"BDM-MLI-611041-A-BK"} ##Response: "true"

actual and expected result are similar and children get assigned to it's parents but when it comes to bulk api this is the exception which i am getting at Magento\ConfigurableProduct\Model\LinkManagement class in function addChild line no 122 - 125

usamahabib786 avatar Jan 17 '19 10:01 usamahabib786

@magento-engcom-team give me 2.3-develop instance

LuciferStrome avatar Jan 17 '19 10:01 LuciferStrome

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

magento-engcom-team avatar Jan 17 '19 10:01 magento-engcom-team

Hi @LuciferStrome, here is your Magento instance. Admin access: https://i-20366-2-3-develop.instances.magento-community.engineering/admin Login: admin Password: 123123q Instance will be terminated in up to 3 hours.

magento-engcom-team avatar Jan 17 '19 10:01 magento-engcom-team

Hi @usamahabib786. 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-engcom-team give me $VERSION instance

where $VERSION is version tags (starting from 2.2.0+) or develop branches (for example: 2.3-develop). For more details, please, review the Magento Contributor Assistant documentation.

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

  • [ ] yes
  • [ ] no

magento-engcom-team avatar Jan 17 '19 10:01 magento-engcom-team

Hi @LuciferStrome. 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.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.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. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

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

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

magento-engcom-team avatar Jan 17 '19 10:01 magento-engcom-team

@LuciferStrome Thank you for verifying the issue.

Unfortunately, not enough information was provided to created internal ticket. Please consider adding the following:

  • [ ] Add "Reproduced on " label(s) to this ticket based on verification result

Once all required information is added, please add label "Issue: Confirmed" again. Thanks!

magento-engcom-team avatar Jan 17 '19 10:01 magento-engcom-team

@LuciferStrome Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-97691, MAGETWO-97692 were created

magento-engcom-team avatar Jan 17 '19 10:01 magento-engcom-team

Hi @engcom-backlog-nazar. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if your 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.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.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. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

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

magento-engcom-team avatar Jan 17 '19 11:01 magento-engcom-team

Hi @engcom-backlog-nazar is there any update you wnat from me clearly i have mentioned everything required and tested it with magento 2.3 Community edition version furthermore I can provide any othere information required

usamahabib786 avatar Jan 17 '19 11:01 usamahabib786

@usamahabib786 i think this is non-issue, you may have wrong payload, or some else. now i rechecking this

ghost avatar Jan 17 '19 11:01 ghost

@engcom-backlog-nazar i have mentioned the payload for this bulk call. If i provide wrong payload to the endpoint before it executes the request it returns field name required message with the key mentioned as u know. The main issue is when i am going with traditional rest api endpoint for linking products its all working fine as i move to bulk api this is the message.

usamahabib786 avatar Jan 17 '19 12:01 usamahabib786

@engcom-backlog-nazar But if my payload for this request is wrong, if you could please help me with providing correct payload to this endpoint for bulk api.

endpoint: rest/async/bulk/V1/configurable-products/bySku/child

usamahabib786 avatar Jan 17 '19 12:01 usamahabib786

@usamahabib786 i'm really confused, is your parent product have configurable options ? Because i'm not able to reproduce following steps you described, the error you have, says that your's parent product dosn't have configurable options. selection_273

ghost avatar Jan 17 '19 12:01 ghost

@engcom-backlog-nazar i am using this endpoint with following payload to assign configurable attribute options endpoint : rest/async/bulk/V1/configurable-products/bySku/options payload: [ { "sku": "BDD-PRI-K1150-A-CP-C", "option": { "attribute_id": 139, "label": "finish", "position": 0, "is_use_default": true, "values": [ { "value_index": 123 }, { "value_index": 125 }, { "value_index": 124 } ] } } ] you can check with it as well. I am using bulk api for creation of options and child parent link

usamahabib786 avatar Jan 17 '19 12:01 usamahabib786

@usamahabib786 I'm understand clearly,i'm following your steps, but i'm created option for configurable products in admin area,so basically your issue about correctly set product as configurable, there no issue on magento side.

ghost avatar Jan 17 '19 13:01 ghost

@usamahabib786 is your product have a type of configurable ?

ghost avatar Jan 17 '19 13:01 ghost

@engcom-backlog-nazar Yes my product is configurable type.

usamahabib786 avatar Jan 17 '19 13:01 usamahabib786

Hi @Nazar65. 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:

  • [x] 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.

  • [x] 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.

  • [x] 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.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.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. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

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

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

magento-engcom-team avatar Jan 19 '19 07:01 magento-engcom-team

@usamahabib786 i'm also not able to reproduce, seems like you have wrong flow to create configurable product.

Nazar65 avatar Jan 19 '19 16:01 Nazar65

I am having exactly the same issue on a Magento 2.3 EE vanilla installation. The rest/async/bulk/V1/configurable-products/bySku/child bulk enpoint always returns The parent product doesn't have configurable product options. Calling the standard REST endpoint (rest/V1/configurable-products/{ParentSKU}/child) for exactly the same Parent/Child SKU works so there must be something wrong with the bulk API.

The steps to reproduce this are:

  1. Create a configurable product and simple child products in a single payload via the bulk framework (using the rest/async/bulk/V1/products endpoint)
  2. Create the configurable product options using the rest/async/bulk/V1/configurable-products/bySku/options endpoint
  3. Try and link the child SKUs to parents using the rest/async/bulk/V1/configurable-products/bySku/child endpoint

rddwh avatar Jan 22 '19 16:01 rddwh