magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

salesShipmentRepositoryV1 api sql error

Open owenhaynes opened this issue 10 years ago • 5 comments

Steps to reproduce

  1. using Magento 2.0.4
  2. Call the api at POST /rest/V1/shipment with data

{ "entity": { "orderId": 1, "comments": [{ "comment": "test" }] } }

Expected result

  1. Shipment created

Actual result

{ "message": "Could not save shipment" }

and in the magneto logs

[2016-03-06 18:07:10] main.CRITICAL: Zend_Db_Statement_Exception: Report ID: webapi-56dc71ced11ac; Message: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'price' in 'where clause', query was: SELECT main_table.* FROM sales_order AS main_table WHERE (price < '10') in /var/www/html/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php:194 Stack trace: #0 /var/www/html/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php(139): Magento\Framework\Webapi\ErrorProcessor->_critical(Object(Zend_Db_Statement_Exception)) #1 /var/www/html/app/code/Magento/Webapi/Controller/Rest.php(163): Magento\Framework\Webapi\ErrorProcessor->maskException(Object(Zend_Db_Statement_Exception)) #2 /var/www/html/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(24): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http)) #3 /var/www/html/lib/internal/Magento/Framework/App/Http.php(115): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http)) #4 /var/www/html/lib/internal/Magento/Framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch() #5 /var/www/html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http)) #6 {main} [] []

exception.logmain.CRITICAL: Zend_Db_Statement_Exception: Report ID: webapi-56dc71ced11ac; Message: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'price' in 'where clause', query was: SELECT main_table.* FROM sales_order AS main_table WHERE (price < '10') in /var/www/html/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php:194

owenhaynes avatar Apr 03 '16 09:04 owenhaynes

@owenhaynes You must mark atleast one item as shipped for the shipment to get created. Have a look here .

mujtaba2012 avatar Apr 13 '16 10:04 mujtaba2012

Will give this a shot later, but still unrelated to the mysql error, which is outputted

owenhaynes avatar Apr 13 '16 11:04 owenhaynes

@mbrinton01 can you look into it?

piotrekkaminski avatar Jun 09 '16 22:06 piotrekkaminski

Hello @owenhaynes, @mujtaba2012 is correct. You need to specify the item(s) to be in the shipment in your call. Please try the call again using his feedback and let us know if you receive an error.

mbrinton01 avatar Sep 28 '16 13:09 mbrinton01

According to contributor guide, tickets without response for two weeks should be closed. If this issue still reproducible please feel free to create the new one: format new issue according to the Issue reporting guidelines: with steps to reproduce, actual result and expected result and specify Magento version.

veloraven avatar Oct 28 '16 11:10 veloraven