2

Been testing the payment function, there are some test orders I made myself as a guest and a signed-in customer. But when I select Ship > Submit Shipment I get this error "Cannot save shipment.".

the error message in the exception.log is

[2017-05-26 06:06:55] main.CRITICAL: Exception: Rolled back transaction has not been completed correctly. in /var/www/cedweb.com/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:232

I've tried Truncate order tables but it won't help.

Any help would be much appreciated~

the whole log like the following

2017-05-26 06:06:55] main.CRITICAL: Exception: Rolled back transaction has not been completed correctly. in /var/www/cedweb.com/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:232 Stack trace: #0 /var/www/cedweb.com/vendor/magento/framework/Model/ResourceModel/AbstractResource.php(49): Magento\Framework\DB\Adapter\Pdo\Mysql->beginTransaction() #1 /var/www/cedweb.com/vendor/magento/framework/Model/ResourceModel/Db/AbstractDb.php(386): Magento\Framework\Model\ResourceModel\AbstractResource->beginTransaction()
#2 /var/www/cedweb.com/vendor/magento/module-sales/Model/Order/ItemRepository.php(178): Magento\Framework\Model\ResourceModel\Db\AbstractDb->save(Object(Magento\Sales\Model\Order\Item))
#3 /var/www/cedweb.com/vendor/magento/module-sales/Model/ResourceModel/Order/Relation.php(74): Magento\Sales\Model\Order\ItemRepository->save(Object(Magento\Sales\Model\Order\Item))
#4 /var/www/cedweb.com/vendor/magento/framework/Model/ResourceModel/Db/VersionControl/RelationComposite.php(48): Magento\Sales\Model\ResourceModel\Order\Relation->processRelation(Object(Magento\Sales\Model\Order))
#5  /var/www/cedweb.com/vendor/magento/framework/Model/ResourceModel/Db/VersionControl/AbstractDb.php(57): Magento\Framework\Model\ResourceModel\Db\VersionControl\RelationComposite->processRelations(Object(Magento\Sales\Model\Order))
#6 /var/www/cedweb.com/vendor/magento/framework/Model/ResourceModel/Db/AbstractDb.php(408): Magento\Framework\Model\ResourceModel\Db\VersionControl\AbstractDb->processAfterSaves(Object(Magento\Sales\Model\Order))
#7 /var/www/cedweb.com/vendor/magento/module-sales/Model/ResourceModel/Order.php(174): Magento\Framework\Model\ResourceModel\Db\AbstractDb->save(Object(Magento\Sales\Model\Order))
#8 /var/www/cedweb.com/var/generation/Magento/Sales/Model/ResourceModel/Order/Interceptor.php(24): Magento\Sales\Model\ResourceModel\Order->save(Object(Magento\Sales\Model\Order))
#9 /var/www/cedweb.com/vendor/magento/framework/Model/AbstractModel.php(631): Magento\Sales\Model\ResourceModel\Order\Interceptor->save(Object(Magento\Sales\Model\Order))
#10 /var/www/cedweb.com/vendor/magento/framework/DB/Transaction.php(129): Magento\Framework\Model\AbstractModel->save() #11 /var/www/cedweb.com/vendor/magento/module-shipping/Controller/Adminhtml/Order/Shipment/Save.php(79): Magento\Framework\DB\Transaction->save() #12 /var/www/cedweb.com/vendor/magento/module-shipping/Controller/Adminhtml/Order/Shipment/Save.php(153): Magento\Shipping\Controller\Adminhtml\Order\Shipment\Save->_saveShipment(Object(Magento\Sales\Model\Order\Shipment))
#13 /var/www/cedweb.com/vendor/magento/framework/App/Action/Action.php(102): Magento\Shipping\Controller\Adminhtml\Order\Shipment\Save->execute()
#14 /var/www/cedweb.com/vendor/magento/module-backend/App/AbstractAction.php(226): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#15 /var/www/cedweb.com/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#16 /var/www/cedweb.com/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Shipping\Controller\Adminhtml\Order\Shipment\Save\Interceptor->___callParent('dispatch', Array) #17 /var/www/cedweb.com/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Shippin...', 'dispatch', Object(Magento\Shipping\Controller\Adminhtml\Order\Shipment\Save\Interceptor), Array, 'adminAuthentica...') #18 /var/www/cedweb.com/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#19 /var/www/cedweb.com/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Shipping\Controller\Adminhtml\Order\Shipment\Save\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #20 /var/www/cedweb.com/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Shippin...', 'dispatch', Object(Magento\Shipping\Controller\Adminhtml\Order\Shipment\Save\Interceptor), Array, 'adminMassaction...')  #21 /var/www/cedweb.com/vendor/magento/module-backend/App/Action/Plugin/MassactionKey.php(33): Magento\Shipping\Controller\Adminhtml\Order\Shipment\Save\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#22 /var/www/cedweb.com/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Backend\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\Shipping\Controller\Adminhtml\Order\Shipment\Save\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #23 /var/www/cedweb.com/var/generation/Magento/Shipping/Controller/Adminhtml/Order/Shipment/Save/Interceptor.php(26): Magento\Shipping\Controller\Adminhtml\Order\Shipment\Save\Interceptor->___callPlugins('dispatch', Array, Array) #24 /var/www/cedweb.com/vendor/magento/framework/App/FrontController.php(55): Magento\Shipping\Controller\Adminhtml\Order\Shipment\Save\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#25 /var/www/cedweb.com/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#26 /var/www/cedweb.com/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array) #27 /var/www/cedweb.com/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')  #28 /var/www/cedweb.com/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#29 /var/www/cedweb.com/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #30 /var/www/cedweb.com/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array) #31 /var/www/cedweb.com/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#32 /var/www/cedweb.com/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch() #33 /var/www/cedweb.com/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#34 {main} [] []
1

I solved the issue with below code added in this path : /vendor/magento/framework/DB/Adapter/Pdo/Mysql.php

case 'longtext':
    if (is_array($value)) {
        $value = json_encode($value);
    }
    $value  = (string)$value;
    if ($column['NULLABLE'] && $value == '') {
        $value = null;
    }
    break;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.