magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.57k stars 9.32k forks source link

Checkout Agreements are broken on OnePageCheckout - 2.0.5 #4379

Closed viktor-zhuromskyy closed 7 years ago

viktor-zhuromskyy commented 8 years ago

Rest API throws 500 eror with the following error code logged: s:181:"Fatal Error: 'Call to a member function getAgreementIds() on null' in '/var/data/mfs/www/magento/app/code/Magento/CheckoutAgreements/Model/Checkout/Plugin/Validation.php' on line 62";

piotrekkaminski commented 8 years ago

@choukalos please review and file bug

designhunger commented 8 years ago

This is still a problem in version 2.0.7 and therefor a checkout in a german shop is not possible. Attached you find the complete stack trace.

"Fatal Error: 'Uncaught Error: Call to a member function getAgreementIds() on null in /Users/Bernd/Entwicklung/Magento/infoplus/vendor/magento/module-checkout-agreements/Model/Checkout/Plugin/Validation.php:62Stack trace:#0 [internal function]: Magento\CheckoutAgreements\Model\Checkout\Plugin\Validation->beforeSavePaymentInformationAndPlaceOrder(Object(Magento\Checkout\Model\PaymentInformationManagement\Interceptor), 51, Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address))#1 /Users/Bernd/Entwicklung/Magento/infoplus/vendor/magento/framework/Interception/Interceptor.php(121): call_user_func_array(Array, Array)#2 /Users/Bernd/Entwicklung/Magento/infoplus/var/generation/Magento/Checkout/Model/PaymentInformationManagement/Interceptor.php(26): Magento\Checkout\Model\PaymentInformationManagement\Interceptor->___callPlugins('savePaymentInfo...', Array, Array)#3 [internal function]: Magento\Checkout\Model\PaymentInformationManagement\Interceptor->savePaymentInformationAndPlaceOrder(51, Object(M' in '/Users/Bernd/Entwicklung/Magento/infoplus/vendor/magento/module-checkout-agreements/Model/Checkout/Plugin/Validation.php' on line 62"

ishakhsuvarov commented 8 years ago

@devdesco-ceo @designhunger We have tried, but could not reproduce the issue yet with the clean installation from 2.0 branch. Please provide more detailed information on Checkout Agreements configuration you are using. Thank you.

designhunger commented 8 years ago

@ishakhsuvarov I'm still on travels. If @devdesco-ceo is not testing it til monday, I'll get back to this.

designhunger commented 8 years ago

In our case this was related to the payone payment plugin. They are updating their plugin next week, so this should be fixed by then.

kanduvisla commented 8 years ago

I also have this problem on 2.0.7 with the checkmo payment method. A sidenote is that I use MageStores' OneStepCheckout, but I don't see any files of them in the stack trace.

<br />
<b>Fatal error</b>:  Uncaught Error: Call to a member function getAgreementIds() on null in /var/www/awesome/vendor/magento/module-checkout-agreements/Model/Checkout/Plugin/Validation.php:62
Stack trace:
#0 [internal function]: Magento\CheckoutAgreements\Model\Checkout\Plugin\Validation-&gt;beforeSavePaymentInformationAndPlaceOrder(Object(Magento\Checkout\Model\PaymentInformationManagement\Interceptor), 29, Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address))
#1 /var/www/awesome/vendor/magento/framework/Interception/Interceptor.php(121): call_user_func_array(Array, Array)
#2 /var/www/awesome/var/generation/Magento/Checkout/Model/PaymentInformationManagement/Interceptor.php(26): Magento\Checkout\Model\PaymentInformationManagement\Interceptor-&gt;___callPlugins('savePaymentInfo...', Array, Array)
#3 [internal function]: Magento\Checkout\Model\PaymentInformationManagement\Interceptor-&gt;savePaymentInformationAndPlaceOrder(29, Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address in <b>/var/www/awesome/vendor/magento/module-checkout-agreements/Model/Checkout/Plugin/Validation.php</b> on line <b>62</b><br />
{"messages":{"error":[{"code":500,"message":"Fatal Error: 'Uncaught Error: Call to a member function getAgreementIds() on null in \/var\/www\/awesome\/vendor\/magento\/module-checkout-agreements\/Model\/Checkout\/Plugin\/Validation.php:62\nStack trace:\n#0 [internal function]: Magento\\CheckoutAgreements\\Model\\Checkout\\Plugin\\Validation->beforeSavePaymentInformationAndPlaceOrder(Object(Magento\\Checkout\\Model\\PaymentInformationManagement\\Interceptor), 29, Object(Magento\\Quote\\Model\\Quote\\Payment), Object(Magento\\Quote\\Model\\Quote\\Address))\n#1 \/var\/www\/awesome\/vendor\/magento\/framework\/Interception\/Interceptor.php(121): call_user_func_array(Array, Array)\n#2 \/var\/www\/awesome\/var\/generation\/Magento\/Checkout\/Model\/PaymentInformationManagement\/Interceptor.php(26): Magento\\Checkout\\Model\\PaymentInformationManagement\\Interceptor->___callPlugins('savePaymentInfo...', Array, Array)\n#3 [internal function]: Magento\\Checkout\\Model\\PaymentInformationManagement\\Interceptor->savePaymentInformationAndPlaceOrder(29, Object(Magento\\Quote\\Model\\Quote\\Payment), Object(Magento\\Quote\\Model\\Quote\\Address' in '\/var\/www\/awesome\/vendor\/magento\/module-checkout-agreements\/Model\/Checkout\/Plugin\/Validation.php' on line 62","trace":"Trace is not available."}]}}
versdivers commented 8 years ago

For me this is still a problem. Someone has a solution?

versdivers commented 8 years ago

Updated to 2.0.9 and still have the issue

magento-engcom-team commented 7 years ago

@viktor-zhuromskyy thank you for your report. Please use the issue reporting guidelines to report an issue. Please, edit issue description and include the preconditions, the steps required to reproduce, the actual result, and the expected result. Please, add the following information:

magento-engcom-team commented 7 years ago

@viktor-zhuromskyy we are closing this issue due to inactivity. If you'd like to update it, please reopen the issue.