Closed
Description
Preconditions
- Magento 2.1.2
Note: I thought this may be the same as bug sku attribute save error #1222 but I have upgraded from Magento 2.1.0 to 2.1.2 and am still seeing the same error
Steps to reproduce
I am updating the attributes of an existing product through the Magento API, using method addAttributeUpdate($code, $value, $store) in Catalog/Model/Product.php
I am able to update other product attributes (of any scope) using this method apart from the sku attribute, I get error Unknown column 'catalog_product_entity.value_id' in 'field list' in C:\xampp\htdocs\magento\vendor\magento\zendframework1\library\Zend\Db\Statement\Pdo.php on line 228
So I want to change the sku name from one value to another value through the method, but get the above error message.
Expected result
- I should be able to use the addAttributeUpdate method to update the sku value.
Actual result
- From exception.log file:
Next exception 'Exception' with message 'Report ID: webapi-58172eac5556e; Message: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'catalog_product_entity.value_id' in 'field list', query was: SELECTcatalog_product_entity
.value_id
FROMcatalog_product_entity
WHERE (attribute_id='71' AND entity_id='2052')' in C:\xampp\htdocs\magento\vendor\magento\framework\Webapi\ErrorProcessor.php:195
Stack trace:
#0 C:\xampp\htdocs\magento\vendor\magento\framework\Webapi\ErrorProcessor.php(139): Magento\Framework\Webapi\ErrorProcessor->_critical(Object(Zend_Db_Statement_Exception))
Can you commit to repository a folder dev/tests/static ? #1 C:\xampp\htdocs\magento\vendor\magento\module-webapi\Controller\Rest.php(219): Magento\Framework\Webapi\ErrorProcessor->maskException(Object(Zend_Db_Statement_Exception))
BUG FIX - Uncaught exception when accessing admin with none existent use... #2 C:\xampp\htdocs\magento\var\generation\Magento\Webapi\Controller\Rest\Interceptor.php(37): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
__DIR__ Typo fixed #3 C:\xampp\htdocs\magento\vendor\magento\framework\App\Http.php(135): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
Enable Magento_Profiler by SetEnv #4 C:\xampp\htdocs\magento\vendor\magento\framework\App\Bootstrap.php(258): Magento\Framework\App\Http->launch()
Enable automated CRUD setup for Adminhtml Grids #5 C:\xampp\htdocs\magento\index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
Why use private for message ? #6 {main} [] []