Closed AndyJAllen closed 5 years ago
Hi @AndyJAllen. Thank you for your report. To help us process this issue please make sure that you provided the following information:
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 give me 2.3-develop instance
- upcoming 2.3.x release
For more details, please, review the Magento Contributor Assistant documentation.
@AndyJAllen do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
Hi @ajijshekh123. 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).Details
If 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
branchDetails
- Add the comment @magento 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 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.
Give me @magento give me 2.3-develop instance
Hi @ajijshekh123. Thank you for your request. I'm working on Magento 2.3-develop instance for you
Hi @ajijshekh123, here is your Magento instance.
Admin access: https://i-23384-2-3-develop.instances.magento-community.engineering/admin
Login: admin
Password: 123123q
Instance will be terminated in up to 3 hours.
Hi @AndyJAllen, In Magento 2.3 Instance, I have Placed the order using a different Payment method like.. Braintree, Check money order and Cash on delivery. See attached the screenshot:
@AndyJAllen - Can you explain to me which payment method you using and face the error. @AndyJAllen - If this issue is not related to Default Magento Instance I will close this issue.
Hi @AndyJAllen, In Magento 2.3 Instance, I have Placed the order using a different Payment method like.. Braintree, Check money order and Cash on delivery.
@AndyJAllen - Can you explain to me which payment method you using and face the error. @AndyJAllen - If this issue is not related to Default Magento Instance I will close this issue.
I used Paypal Payflow -- but I also experienced the error with Purchase Order payment method. I did not test in vanilla instance so its possible its specific to how my instance was upgraded via composer.
I played around with the code in Create.php and got it to work by adding an isset() check. So I changed Create.php function from
protected function _prepareQuoteItems() { foreach ($this->getQuote()->getAllItems() as $item) { $options = []; $productOptions = $item->getProduct()->getTypeInstance()->getOrderOptions($item->getProduct()); if ($productOptions) { $productOptions['info_buyRequest']['options'] = $this->_prepareOptionsForRequest($item); $options = $productOptions; } $addOptions = $item->getOptionByCode('additional_options'); if ($addOptions) { $options['additional_options'] = $this->serializer->unserialize($addOptions->getValue()); } $item->setProductOrderOptions($options); } return $this; }
to
protected function _prepareQuoteItems() { foreach ($this->getQuote()->getAllItems() as $item) { $options = []; $productOptions = $item->getProduct()->getTypeInstance()->getOrderOptions($item->getProduct()); if ($productOptions) { if(isset($productOptions['info_buyRequest']['options'])){ $productOptions['info_buyRequest']['options'] = $this->_prepareOptionsForRequest($item); } $options = $productOptions; } $addOptions = $item->getOptionByCode('additional_options'); if ($addOptions) { $options['additional_options'] = $this->serializer->unserialize($addOptions->getValue()); } $item->setProductOrderOptions($options); } return $this; }
Hello @AndyJAllen ! You used custom code here , am i right ?
Hello @AndyJAllen ! You used custom code here , am i right ?
Hello Charlie,
All the code is from "magento/product-community-edition": "2.3.1" as of 5/31
I just bypassed the line of code in question to test-- the isset() addition probably doesn't make sense when attempting to set a value in this case. However it let me place the order through admin and it looks fine.
Hi @engcom-Charlie. 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).Details
If 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
branchDetails
- Add the comment @magento 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 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.
Hello @AndyJAllen ! I can`t reproduce this issue after migrating from Magento 2.2.6 to Magento 2.3.1 .
Some more information here. I'm still experiencing this on 2.3.3. I think its related to $data['info_buyRequest']
Here is what gets dropped into system.log:
`[2019-10-22 16:47:34] main.CRITICAL: Exception message: Warning: Illegal string offset 'options' in .../public_html/vendor/magento/module-sales/Model/AdminOrder/Create.php on line 1912 Trace:
#1 Magento\Sales\Model\AdminOrder\Create->_prepareQuoteItems() called at [vendor/magento/module-sales/Model/AdminOrder/Create.php:1934][] []`2 Magento\Sales\Model\AdminOrder\Create->createOrder() called at [vendor/magento/module-sales/Controller/Adminhtml/Order/Create/Save.php:52]
3 Magento\Sales\Controller\Adminhtml\Order\Create\Save->execute() called at [vendor/magento/framework/App/Action/Action.php:108]
4 Magento\Framework\App\Action\Action->dispatch(&Magento\Framework\App\Request\Http#000000000c8cec61000000003daea07c#) called at [vendor/magento/module-backend/App/AbstractAction.php:231]
5 Magento\Backend\App\AbstractAction->dispatch(&Magento\Framework\App\Request\Http#000000000c8cec61000000003daea07c#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
6 Magento\Sales\Controller\Adminhtml\Order\Create\Save\Interceptor->___callParent('dispatch', array(&Magento\Framework\App\Request\Http#000000000c8cec61000000003daea07c#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
7 Magento\Sales\Controller\Adminhtml\Order\Create\Save\Interceptor->Magento\Framework\Interception{closure}(&Magento\Framework\App\Request\Http#000000000c8cec61000000003daea07c#) called at [vendor/magento/module-backend/App/Action/Plugin/Authentication.php:143]
8 Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(&Magento\Sales\Controller\Adminhtml\Order\Create\Save\Interceptor#000000000c8cef6d000000003daea07c#, &Closure#000000000c8cef13000000003daea07c#, &Magento\Framework\App\Request\Http#000000000c8cec61000000003daea07c#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
9 Magento\Sales\Controller\Adminhtml\Order\Create\Save\Interceptor->Magento\Framework\Interception{closure}(&Magento\Framework\App\Request\Http#000000000c8cec61000000003daea07c#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
10 Magento\Sales\Controller\Adminhtml\Order\Create\Save\Interceptor->___callPlugins('dispatch', array(&Magento\Framework\App\Request\Http#000000000c8cec61000000003daea07c#), NULL) called at [generated/code/Magento/Sales/Controller/Adminhtml/Order/Create/Save/Interceptor.php:26]
11 Magento\Sales\Controller\Adminhtml\Order\Create\Save\Interceptor->dispatch(&Magento\Framework\App\Request\Http#000000000c8cec61000000003daea07c#) called at [vendor/magento/framework/App/FrontController.php:159]
12 Magento\Framework\App\FrontController->processRequest(&Magento\Framework\App\Request\Http#000000000c8cec61000000003daea07c#, &Magento\Sales\Controller\Adminhtml\Order\Create\Save\Interceptor#000000000c8cef6d000000003daea07c#) called at [vendor/magento/framework/App/FrontController.php:99]
13 Magento\Framework\App\FrontController->dispatch(&Magento\Framework\App\Request\Http#000000000c8cec61000000003daea07c#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
14 Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', array(&Magento\Framework\App\Request\Http#000000000c8cec61000000003daea07c#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
15 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(&Magento\Framework\App\Request\Http#000000000c8cec61000000003daea07c#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
16 Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', array(&Magento\Framework\App\Request\Http#000000000c8cec61000000003daea07c#), array(array('default_store_se...', 'page_cachefrom...', 'storeCookieValid...', 'install', 'configHash'))) called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
17 Magento\Framework\App\FrontController\Interceptor->dispatch(&Magento\Framework\App\Request\Http#000000000c8cec61000000003daea07c#) called at [vendor/magento/framework/App/Http.php:137]
18 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
19 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]
20 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#000000000c8cec85000000003daea07c#) called at [index.php:39]
Hello @AndyJAllen So could you create new issue with new steps to reproduce and additional info?
This issue stemmed from incorrect serialization of data in table sales_order_item for the field product_options. The data got out of wack and needed corrected; which I wrote a program to do.
Preconditions (*)
1.Magento 2.3.1 (Upgraded from 2.2.6 with existing products)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
I can place orders from the frontend just fine with the same product(s) & same customer.