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

Missing required argument $productAvailabilityChecks of Magento\Sales\Model\Order\Reorder\OrderedProductAvailabilityChecker. #20825

Closed
ianitsky opened this issue Jan 30, 2019 · 18 comments
Assignees
Labels
Component: Sales 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: 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 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

Comments

@ianitsky
Copy link

ianitsky commented Jan 30, 2019

Preconditions (*)

  1. Magento 2.2.7
  2. PHP 7.1

Steps to reproduce (*)

  1. Admin -> Sales -> Any Order -> Reorder

Expected result (*)

  1. Continue to reorder process.

Actual result (*)

  1. Shows exception:

1 exception(s):
Exception #0 (BadMethodCallException): Missing required argument $productAvailabilityChecks of Magento\Sales\Model\Order\Reorder\OrderedProductAvailabilityChecker.

Exception #0 (BadMethodCallException): Missing required argument $productAvailabilityChecks of Magento\Sales\Model\Order\Reorder\OrderedProductAvailabilityChecker.
#0 /var/www/magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\Sales\M...', Array, Array)
#1 /var/www/magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\Sales\M...', Array, Array)
#2 /var/www/magento/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Sales\M...')
#3 /var/www/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(144): Magento\Framework\ObjectManager\ObjectManager->get('Magento\Sales\M...')
#4 /var/www/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(230): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\Sales\M...', NULL, 'orderedProductA...', 'Magento\Sales\M...')
#5 /var/www/magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\Sales\M...', Array, Array)
#6 /var/www/magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\Sales\M...', Array, Array)
#7 /var/www/magento/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Sales\M...')
#8 /var/www/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(144): Magento\Framework\ObjectManager\ObjectManager->get('Magento\Sales\M...')
#9 /var/www/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(230): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\Sales\M...', NULL, 'unavailableProd...', 'Magento\Sales\C...')
#10 /var/www/magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\Sales\C...', Array, Array)
#11 /var/www/magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\Sales\C...', Array, Array)
#12 /var/www/magento/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Sales\C...', Array)
#13 /var/www/magento/vendor/magento/framework/App/ActionFactory.php(40): Magento\Framework\ObjectManager\ObjectManager->create('Magento\Sales\C...')
#14 /var/www/magento/vendor/magento/framework/App/Router/Base.php(297): Magento\Framework\App\ActionFactory->create('Magento\Sales\C...')
#15 /var/www/magento/vendor/magento/framework/App/Router/Base.php(158): Magento\Framework\App\Router\Base->matchAction(Object(Magento\Framework\App\Request\Http), Array)
#16 /var/www/magento/vendor/magento/framework/App/FrontController.php(50): Magento\Framework\App\Router\Base->match(Object(Magento\Framework\App\Request\Http))
#17 /var/www/magento/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#18 /var/www/magento/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#19 /var/www/magento/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
#20 /var/www/magento/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#21 /var/www/magento/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#22 /var/www/magento/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Http->launch()
#23 /var/www/magento/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\Http\Interceptor->___callParent('launch', Array)
#24 /var/www/magento/vendor/msp/apienhancer/Plugin/AppInterfacePlugin.php(75): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception{closure}()
#25 /var/www/magento/vendor/magento/framework/Interception/Interceptor.php(135): MSP\APIEnhancer\Plugin\AppInterfacePlugin->aroundLaunch(Object(Magento\Framework\App\Http\Interceptor), Object(Closure))
#26 /var/www/magento/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception{closure}()
#27 /var/www/magento/generated/code/Magento/Framework/App/Http/Interceptor.php(26): Magento\Framework\App\Http\Interceptor->___callPlugins('launch', Array, NULL)
#28 /var/www/magento/vendor/magento/framework/App/Bootstrap.php(257): Magento\Framework\App\Http\Interceptor->launch()
#29 /var/www/magento/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#30 {main}

@magento-engcom-team give me 2.2.7 instance

@magento-engcom-team
Copy link
Contributor

Hi @ianitsky. 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 2.3-develop instance - upcoming 2.3.x release

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

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

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Jan 30, 2019
@dominicfernando dominicfernando self-assigned this Jan 31, 2019
@magento-engcom-team
Copy link
Contributor

Hi @dominicfernando. 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.

@dominicfernando
Copy link
Contributor

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

@magento-engcom-team
Copy link
Contributor

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

@shikhamis11 shikhamis11 self-assigned this Jan 31, 2019
@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Jan 31, 2019

Hi @shikhamis11. 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.

@shikhamis11
Copy link
Member

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

@magento-engcom-team
Copy link
Contributor

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

@dominicfernando dominicfernando removed their assignment Jan 31, 2019
@nainesh2jcommerce
Copy link
Contributor

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

@nainesh2jcommerce nainesh2jcommerce self-assigned this Jan 31, 2019
@magento-engcom-team
Copy link
Contributor

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

@magento-engcom-team
Copy link
Contributor

Hi @nainesh2jcommerce. 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.

@shikhamis11 shikhamis11 added the Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch label Jan 31, 2019
@shikhamis11
Copy link
Member

shikhamis11 commented Jan 31, 2019

Hi @ianitsky I checked the issue at my local environment with current 2.2- develop branch code . This issue is not reproducable so I am closing this. You can share screenshots here if you still get issue in 2.2-develop branch

@zaximus84
Copy link

I came across this issue when Magento_ConfigurableProductSales was disabled on a 2.2.3 installation. The productAvailabilityChecks argument isn't defined in di.xml in Magento_Sales. The sole definition comes from Magento_ConfigurableProductSales's di.xml when its adding its own check to the array (and in fact defining the argument as an array).

If you disable Magento_ConfigurableProductSales, you'll get the error. As the Sales module shouldn't depend on ConfigurableProductSales, the argument should really be defined in the Sales module and I'd classify this as a core bug. This just needs to be added to the Sales di.xml:

<type name="Magento\Sales\Model\Order\Reorder\OrderedProductAvailabilityChecker"> <arguments> <argument name="productAvailabilityChecks" xsi:type="array" /> </arguments> </type>

I added that via patch and it fixed the error, even with ConfigurableProductSales still disabled.

@shikhamis11
Copy link
Member

@zaximus84 thanks for explanation I will recheck and reopen the issue if it exists

@shikhamis11 shikhamis11 reopened this Feb 12, 2019
@shikhamis11 shikhamis11 added Component: Sales Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release and removed Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch labels Feb 12, 2019
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @shikhamis11
Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-98209, MAGETWO-98210 were created

Issue Available: @shikhamis11, 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 magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Feb 12, 2019
@shikhamis11
Copy link
Member

@zaximus84 yes found the issue .. yes Sales module shouldn't depend on ConfigurableProductSales . If you have solution for the issue please create Pull request .
https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#pull_request

@kisroman kisroman self-assigned this Mar 18, 2019
@magento-engcom-team
Copy link
Contributor

Hi @kisroman. 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.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.

kisroman added a commit to kisroman/magento2 that referenced this issue Mar 18, 2019
… Magento\Sales\Model\Order\Reorder\OrderedProductAvailabilityChecker.
kisroman added a commit to kisroman/magento2 that referenced this issue Mar 20, 2019
… Magento\Sales\Model\Order\Reorder\OrderedProductAvailabilityChecker.
@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Mar 25, 2019
@magento-engcom-team
Copy link
Contributor

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

The fix will be available with the upcoming 2.3.2 release.

magento-engcom-team added a commit that referenced this issue Mar 25, 2019
…cks of Magent… #21820

 - Merge Pull Request #21820 from kisroman/magento2:20825
 - Merged commits:
   1. c4f8496
   2. 933d35d
   3. 5dbbffb
amol2jcommerce pushed a commit to amol2jcommerce/magento2 that referenced this issue Mar 25, 2019
… Magento\Sales\Model\Order\Reorder\OrderedProductAvailabilityChecker.
amol2jcommerce pushed a commit to amol2jcommerce/magento2 that referenced this issue Mar 25, 2019
… Magento\Sales\Model\Order\Reorder\OrderedProductAvailabilityChecker.
@magento-engcom-team magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Mar 27, 2019
@magento-engcom-team
Copy link
Contributor

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

The fix will be available with the upcoming 2.2.9 release.

magento-engcom-team added a commit that referenced this issue Mar 27, 2019
…labilityChecks of Magent… #21920

 - Merge Pull Request #21920 from amol2jcommerce/magento2:2.2-develop-PR-port-21820
 - Merged commits:
   1. 6958066
   2. 61d7158
magento-engcom-team pushed a commit that referenced this issue Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Sales 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: 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 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
Projects
None yet
Development

No branches or pull requests

7 participants