Skip to content

Fixed reordering bundle product with unexist selections #23263

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

Closed
wants to merge 2 commits into from
Closed

Fixed reordering bundle product with unexist selections #23263

wants to merge 2 commits into from

Conversation

NikolasSumrak
Copy link
Contributor

@NikolasSumrak NikolasSumrak commented Jun 14, 2019

Description (*)

Fixed reordering bundle product with old, unexist selections.

Fixed Issues (if relevant)

  1. [CE 2.1.0 RC3] Reorder issue - The options you selected are not available #5192: Reorder issue - The options you selected are not available

Manual testing scenarios (*)

Have magento v2.2.8

  1. Create bundle product with some options
  2. Order it from front-end
  3. Remove one of options, add some another option
  4. Press "Reorder" button in customer cabinet (or admin panel)

Error from admin panel:
1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): The options you selected are not available.

Error from front-end
Fatal error: Uncaught Error: Call to a member function getValue() on null in /var/www/magento/vendor/magento/module-bundle/Model/Product/Type.php on line 310

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Jun 14, 2019

Hi @NikolasSumrak. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.3-develop instance - deploy vanilla Magento instance

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

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Jun 14, 2019

CLA assistant check
All committers have signed the CLA.

@slavvka slavvka self-assigned this Aug 6, 2019
@slavvka
Copy link
Member

slavvka commented Aug 7, 2019

@magento give me test instance

@magento-engcom-team
Copy link
Contributor

Hi @slavvka. Thank you for your request. I'm working on Magento instance for you

@magento-engcom-team
Copy link
Contributor

Hi @slavvka, here is your new Magento instance.
Admin access: https://pr-23263.instances.magento-community.engineering/admin
Login: admin Password: 123123q

@slavvka
Copy link
Member

slavvka commented Aug 7, 2019

@magento run Database Compare build

@sdzhepa
Copy link
Contributor

sdzhepa commented Aug 7, 2019

Hello @NikolasSumrak
fyi: @slavvka

Thank you for contribution and collaboration!

During testing on the branch with fix, we faced an issue.
Could you please have a look and fix it?

Manual testing scenario:

  1. Create a simple product, e.g. Simple1
  2. Create new Bundle product
  3. Open Bundle Items section and add new set of Options(Option Set1)
  4. Add Simple1 to the "Option Set1"
  5. Save Product
  6. Go to Storefront and place an order with test bundle
  7. Go to Admin and Delete "Option Set1"
  8. Add new set of Options(Option Set2)
  9. Add Simple1 to the "Option Set2"
  10. Save product
  11. Go to Sales > Orders and open test order
  12. Click "Reorder" button

Actual Result:

  • Page "There has been an error processing your request" is opened
  • var/report contains file with next report
{"0":"The options you selected are not available.","1":"<pre>
#1 Magento\\Sales\\Controller\\Adminhtml\\Order\\Create\\Reorder->execute() called at [generated\/code\/Magento\/Sales\/Controller\/Adminhtml\/Order\/Create\/Reorder\/Interceptor.php:24]\n
#2 Magento\\Sales\\Controller\\Adminhtml\\Order\\Create\\Reorder\\Interceptor->execute() called at [lib\/internal\/Magento\/Framework\/App\/Action\/Action.php:107]\n
#3 Magento\\Framework\\App\\Action\\Action->dispatch(&Magento\\Framework\\App\\Request\\Http#000000004a0e0e64000000002eeac245#) called at [app\/code\/Magento\/Backend\/App\/AbstractAction.php:231]\n
#4 Magento\\Backend\\App\\AbstractAction->dispatch(&Magento\\Framework\\App\\Request\\Http#000000004a0e0e64000000002eeac245#) called at [lib\/internal\/Magento\/Framework\/Interception\/Interceptor.php:58]\n
#5 Magento\\Sales\\Controller\\Adminhtml\\Order\\Create\\Reorder\\Interceptor->___callParent('dispatch', array(&Magento\\Framework\\App\\Request\\Http#000000004a0e0e64000000002eeac245#)) called at [lib\/internal\/Magento\/Framework\/Interception\/Interceptor.php:138]\n
#6 Magento\\Sales\\Controller\\Adminhtml\\Order\\Create\\Reorder\\Interceptor->Magento\\Framework\\Interception\\{closure}(&Magento\\Framework\\App\\Request\\Http#000000004a0e0e64000000002eeac245#) called at [app\/code\/Magento\/Backend\/App\/Action\/Plugin\/Authentication.php:143]\n
#7 Magento\\Backend\\App\\Action\\Plugin\\Authentication->aroundDispatch(&Magento\\Sales\\Controller\\Adminhtml\\Order\\Create\\Reorder\\Interceptor#000000004a0e0ac4000000002eeac245#, &Closure#000000004a0e0aca000000002eeac245#, &Magento\\Framework\\App\\Request\\Http#000000004a0e0e64000000002eeac245#) called at [lib\/internal\/Magento\/Framework\/Interception\/Interceptor.php:135]\n
#8 Magento\\Sales\\Controller\\Adminhtml\\Order\\Create\\Reorder\\Interceptor->Magento\\Framework\\Interception\\{closure}(&Magento\\Framework\\App\\Request\\Http#000000004a0e0e64000000002eeac245#) called at [lib\/internal\/Magento\/Framework\/Interception\/Interceptor.php:153]\n
#9 Magento\\Sales\\Controller\\Adminhtml\\Order\\Create\\Reorder\\Interceptor->___callPlugins('dispatch', array(&Magento\\Framework\\App\\Request\\Http#000000004a0e0e64000000002eeac245#), NULL) called at [generated\/code\/Magento\/Sales\/Controller\/Adminhtml\/Order\/Create\/Reorder\/Interceptor.php:39]\n
#10 Magento\\Sales\\Controller\\Adminhtml\\Order\\Create\\Reorder\\Interceptor->dispatch(&Magento\\Framework\\App\\Request\\Http#000000004a0e0e64000000002eeac245#) called at [lib\/internal\/Magento\/Framework\/App\/FrontController.php:159]\n
#11 Magento\\Framework\\App\\FrontController->processRequest(&Magento\\Framework\\App\\Request\\Http#000000004a0e0e64000000002eeac245#, &Magento\\Sales\\Controller\\Adminhtml\\Order\\Create\\Reorder\\Interceptor#000000004a0e0ac4000000002eeac245#) called at [lib\/internal\/Magento\/Framework\/App\/FrontController.php:99]\n
#12 Magento\\Framework\\App\\FrontController->dispatch(&Magento\\Framework\\App\\Request\\Http#000000004a0e0e64000000002eeac245#) called at [lib\/internal\/Magento\/Framework\/Interception\/Interceptor.php:58]\n
#13 Magento\\Framework\\App\\FrontController\\Interceptor->___callParent('dispatch', array(&Magento\\Framework\\App\\Request\\Http#000000004a0e0e64000000002eeac245#)) called at [lib\/internal\/Magento\/Framework\/Interception\/Interceptor.php:138]\n
#14 Magento\\Framework\\App\\FrontController\\Interceptor->Magento\\Framework\\Interception\\{closure}(&Magento\\Framework\\App\\Request\\Http#000000004a0e0e64000000002eeac245#) called at [lib\/internal\/Magento\/Framework\/Interception\/Interceptor.php:153]\n
#15 Magento\\Framework\\App\\FrontController\\Interceptor->___callPlugins('dispatch', array(&Magento\\Framework\\App\\Request\\Http#000000004a0e0e64000000002eeac245#), array(array('default_store_se...', 'page_cache_from_...', 'storeCookieValid...', 'install', 'configHash'))) called at [generated\/code\/Magento\/Framework\/App\/FrontController\/Interceptor.php:26]\n
#16 Magento\\Framework\\App\\FrontController\\Interceptor->dispatch(&Magento\\Framework\\App\\Request\\Http#000000004a0e0e64000000002eeac245#) called at [lib\/internal\/Magento\/Framework\/App\/Http.php:137]\n
#17 Magento\\Framework\\App\\Http->launch() called at [generated\/code\/Magento\/Framework\/App\/Http\/Interceptor.php:24]\n
#18 Magento\\Framework\\App\\Http\\Interceptor->launch() called at [lib\/internal\/Magento\/Framework\/App\/Bootstrap.php:260]\n
#19 Magento\\Framework\\App\\Bootstrap->run(&Magento\\Framework\\App\\Http\\Interceptor#000000004a0e0e1a000000002eeac245#) called at [index.php:39]\n<\/pre>","url":"\/admin\/sales\/order_create\/reorder\/order_id\/1\/","script_name":"\/index.php"}

@sidolov
Copy link
Contributor

sidolov commented Aug 21, 2019

@NikolasSumrak , I am closing this PR now due to inactivity.
Please reopen and update if you wish to continue.
Thank you for the collaboration!

@sidolov sidolov closed this Aug 21, 2019
@m2-assistant
Copy link

m2-assistant bot commented Aug 21, 2019

Hi @NikolasSumrak, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@dinesh-7445
Copy link

Hi, I am facing the above same issue in Magento 2.3.4. I can't able to reorder and this error throws "The options you selected are not available"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants