Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The parent product doesn't have configurable product options. #20366

Closed
usamahabib786 opened this issue Jan 17, 2019 · 39 comments
Closed

The parent product doesn't have configurable product options. #20366

usamahabib786 opened this issue Jan 17, 2019 · 39 comments
Labels
Component: AsynchronousOperations Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Progress: PR Created Indicates that Pull Request has been created to fix issue Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@usamahabib786
Copy link

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

@LuciferStrome LuciferStrome self-assigned this Jan 17, 2019
@LuciferStrome
Copy link
Member

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

@magento-engcom-team
Copy link
Contributor

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

@magento-engcom-team
Copy link
Contributor

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.

@LuciferStrome LuciferStrome added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed labels Jan 17, 2019
@magento-engcom-team
Copy link
Contributor

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
Copy link
Contributor

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

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

@LuciferStrome LuciferStrome added Component: ConfigurableProduct Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Jan 17, 2019
@magento-engcom-team
Copy link
Contributor

@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 magento-engcom-team removed the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Jan 17, 2019
@LuciferStrome LuciferStrome added Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Jan 17, 2019
@magento-engcom-team
Copy link
Contributor

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

@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Jan 17, 2019
@ghost ghost self-assigned this Jan 17, 2019
@magento-engcom-team
Copy link
Contributor

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.

@ghost ghost removed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Jan 17, 2019
@ghost ghost unassigned LuciferStrome Jan 17, 2019
@usamahabib786
Copy link
Author

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

@ghost
Copy link

ghost commented Jan 17, 2019

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

@usamahabib786
Copy link
Author

@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
Copy link
Author

@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

@Nazar65 Nazar65 added the Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release label Jan 23, 2019
@Nazar65
Copy link
Member

Nazar65 commented Jan 23, 2019

I'm working on this

@rddwh
Copy link

rddwh commented Jan 28, 2019

Hi @Nazar65 any luck with this?

@rddwh
Copy link

rddwh commented Jan 30, 2019

@Nazar65 Slight development our end on this. We have the RabbitMQ management plugin installed and if we force a close on the connection in between sending each payload everything works correctly. It's feels like something is being cached and forcing a close on the connection clears it. Hopefully this helps diagnose the issue further, we are continuing to look our end and will post any further information here.

@Nazar65
Copy link
Member

Nazar65 commented Jan 31, 2019

@rddwh thank for explanations, but i'm found that product dose not have flag has_options when created wia bulk api

@rddwh
Copy link

rddwh commented Jan 31, 2019

@Nazar65 I've just tried this via the standard endpoints:

rest/V1/products
rest/V1/configurable-products/:sku/options
rest/V1/configurable-products/:sku/child

And the has_options is still 0 on the configurable:

image

It's not until I save the item in the admin UI page that it gets set to 1.

@rddwh
Copy link

rddwh commented Jan 31, 2019

I've also tried to send the product payload, then the configurable product options and before posting the link child to parent manually updating the has_options and required_options to 1 before posting the payload. It still fails.

@Nazar65 Nazar65 removed their assignment Feb 26, 2019
@Nazar65 Nazar65 added the Progress: PR Created Indicates that Pull Request has been created to fix issue label Feb 26, 2019
@usamahabib786
Copy link
Author

@rddwh hi did you able to find a way for creating configurable products with bulk api? or still waiting for magento's update? Any reply soon will be highly appreciated as i am seriously facing issue at my work due to this

thanks

@rddwh
Copy link

rddwh commented Mar 11, 2019

@usamahabib786 I've managed to get the products in using only the rest/async/bulk/V1/products endpoint. The process was to upload all the simple products first, download the results from the bulk status endpoint and read the product IDs. Once you have them you can send a payload for the configurable products and include the configurable options and child linking e.g:

"configurable_product_options":[ { "attribute_id":"547", "label":"Colour", "position":0, "values":[ { "value_index":205 } ] }, { "attribute_id":"580", "label":"Size", "position":0, "values":[ { "value_index":1033 }, { "value_index":1039 }, { "value_index":1042 }, { "value_index":1045 }, { "value_index":1048 }, { "value_index":1099 } ] } ], "configurable_product_links":[ 23125, 23128, 23131, 23134, 23137, 23140 ] }

I have multiple tickets open with Magento Support around RabbitMQ though as it's riddled with bugs. Issues include payloads being ignored and sitting with a status of 4 (pending). Some payloads being successfully sent and creating products in Magento but the bulk status returning that they are still pending and performance issues. We did a test and uploaded 11,658 products to the production instance of a Magento Cloud Pro package (48 cores, 64GB RAM) and it took 4.5 hours to complete! I was the only person using the instance at the time so technically had the full grunt of the box to utilise.

@usamahabib786
Copy link
Author

@rddwh thanks for responding, its seem this is the only approach as of now until magento fixes that approach mentioned in official documentation. i am also using it. but how you were able to send this big number of products as i tried posting 3200 approx and i got exception of too big data packet from api it self.

@rddwh
Copy link

rddwh commented Mar 11, 2019

@usamahabib786 I'm sending 500 SKUs at a time. The payloads get queued in RabbitMQ so there's no need to send them up in 1 go.

@usamahabib786
Copy link
Author

@rddwh thanks a lot for being a help.

@korbax
Copy link

korbax commented Mar 15, 2019

@magento-engcom-team Could you please assign this ticket to me? I will work on it.

@AlexandrKozyr AlexandrKozyr self-assigned this Mar 16, 2019
@ghost ghost assigned pedrosousa13 Mar 28, 2019
@magento-engcom-team
Copy link
Contributor

Hi @usamahabib786. Thank you for your report.
The issue has been fixed in #21083 by @pedrosousa13 in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.2 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Apr 11, 2019
amol2jcommerce pushed a commit to amol2jcommerce/magento2 that referenced this issue Apr 12, 2019
This should fix the issue with the configurable products not having any options with Bulk and Async API.
Related issue: magento#20366
@magento-engcom-team magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Apr 18, 2019
@magento-engcom-team
Copy link
Contributor

Hi @usamahabib786. Thank you for your report.
The issue has been fixed in #22295 by @amol2jcommerce in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.9 release.

@ziyaindia
Copy link

Hi All,

My URL is

https://{base_url}/index.php/rest/V1/configurable-products/:sku/children

When I am calling above URL getting following response. Not getting any clue to fix it.

Screenshot from 2020-08-11 10-24-25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: AsynchronousOperations Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Progress: PR Created Indicates that Pull Request has been created to fix issue Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

9 participants