salesShipmentRepositoryV1 api sql error
Steps to reproduce
- using Magento 2.0.4
- Call the api at POST /rest/V1/shipment with data
{ "entity": { "orderId": 1, "comments": [{ "comment": "test" }] } }
Expected result
- 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 You must mark atleast one item as shipped for the shipment to get created. Have a look here .
Will give this a shot later, but still unrelated to the mysql error, which is outputted
@mbrinton01 can you look into it?
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.
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.