Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDOException during attempt to export products: Unknown column 'entity_value.entity_type_id' in 'on clause' #1228

Closed
yukoff opened this issue May 4, 2015 · 4 comments
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: needs update

Comments

@yukoff
Copy link

yukoff commented May 4, 2015

There's an exception thrown while trying to export products:

[2015-05-04 01:15:59] main.CRITICAL: exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'entity_value.entity_type_id' in 'on clause'' in /srv/www/htdocs/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /srv/www/htdocs/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /srv/www/htdocs/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php(95): Zend_Db_Statement_Pdo->_execute(Array)
#2 /srv/www/htdocs/vendor/magento/zendframework1/library/Zend/Db/Statement.php(303): Magento\Framework\DB\Statement\Pdo\Mysql->_execute(Array)
#3 /srv/www/htdocs/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#4 /srv/www/htdocs/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `entity`...', Array)
#5 /srv/www/htdocs/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `entity`...', Array)
#6 /srv/www/htdocs/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(737): Magento\Framework\DB\Adapter\Pdo\Mysql->query(Object(Magento\Framework\DB\Select), Array)
#7 /srv/www/htdocs/app/code/Magento/ConfigurableProduct/Model/Resource/Product/Type/Configurable.php(218): Zend_Db_Adapter_Abstract->fetchAll(Object(Magento\Framework\DB\Select))
#8 /srv/www/htdocs/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php(1025): Magento\ConfigurableProduct\Model\Resource\Product\Type\Configurable->getConfigurableOptions(Object(Magento\Catalog\Model\Product\Interceptor), Array)
#9 /srv/www/htdocs/app/code/Magento/ConfigurableImportExport/Model/Export/RowCustomizer.php(35): Magento\ConfigurableProduct\Model\Product\Type\Configurable->getConfigurableOptions(Object(Magento\Catalog\Model\Product\Interceptor))
#10 /srv/www/htdocs/app/code/Magento/CatalogImportExport/Model/Export/RowCustomizer/Composite.php(43): Magento\ConfigurableImportExport\Model\Export\RowCustomizer->prepareData(Object(Magento\Catalog\Model\Resource\Product\Collection), Array)
#11 /srv/www/htdocs/app/code/Magento/CatalogImportExport/Model/Export/Product.php(790): Magento\CatalogImportExport\Model\Export\RowCustomizer\Composite->prepareData(Object(Magento\Catalog\Model\Resource\Product\Collection), Array)
#12 /srv/www/htdocs/app/code/Magento/CatalogImportExport/Model/Export/Product.php(757): Magento\CatalogImportExport\Model\Export\Product->getExportData()
#13 /srv/www/htdocs/app/code/Magento/ImportExport/Model/Export.php(175): Magento\CatalogImportExport\Model\Export\Product->export()
#14 /srv/www/htdocs/app/code/Magento/ImportExport/Controller/Adminhtml/Export/Export.php(45): Magento\ImportExport\Model\Export->export()
#15 /srv/www/htdocs/var/generation/Magento/ImportExport/Controller/Adminhtml/Export/Export/Interceptor.php(123): Magento\ImportExport\Controller\Adminhtml\Export\Export->execute()
#16 /srv/www/htdocs/lib/internal/Magento/Framework/App/Action/Action.php(102): Magento\ImportExport\Controller\Adminhtml\Export\Export\Interceptor->execute()
#17 /srv/www/htdocs/app/code/Magento/Backend/App/AbstractAction.php(221): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#18 [internal function]: Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#19 /srv/www/htdocs/var/generation/Magento/ImportExport/Controller/Adminhtml/Export/Export/Interceptor.php(57): call_user_func_array(Array, Array)
#20 /srv/www/htdocs/lib/internal/Magento/Framework/Interception/Chain/Chain.php(65): Magento\ImportExport\Controller\Adminhtml\Export\Export\Interceptor->___callParent('dispatch', Array)
#21 /srv/www/htdocs/lib/internal/Magento/Framework/Interception/Chain/Chain.php(58): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\ImportE...', 'dispatch', Object(Magento\ImportExport\Controller\Adminhtml\Export\Export\Interceptor), Array, 'adminAuthentica...')
#22 /srv/www/htdocs/app/code/Magento/Backend/App/Action/Plugin/Authentication.php(96): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#23 [internal function]: Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\ImportExport\Controller\Adminhtml\Export\Export\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#24 /srv/www/htdocs/lib/internal/Magento/Framework/Interception/Chain/Chain.php(63): call_user_func_array(Array, Array)
#25 /srv/www/htdocs/lib/internal/Magento/Framework/Interception/Chain/Chain.php(58): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\ImportE...', 'dispatch', Object(Magento\ImportExport\Controller\Adminhtml\Export\Export\Interceptor), Array, 'designLoader')
#26 /srv/www/htdocs/lib/internal/Magento/Framework/App/Action/Plugin/Design.php(39): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#27 [internal function]: Magento\Framework\App\Action\Plugin\Design->aroundDispatch(Object(Magento\ImportExport\Controller\Adminhtml\Export\Export\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#28 /srv/www/htdocs/lib/internal/Magento/Framework/Interception/Chain/Chain.php(63): call_user_func_array(Array, Array)
#29 /srv/www/htdocs/var/generation/Magento/ImportExport/Controller/Adminhtml/Export/Export/Interceptor.php(96): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\ImportE...', 'dispatch', Object(Magento\ImportExport\Controller\Adminhtml\Export\Export\Interceptor), Array, 'adminMassaction...')
#30 /srv/www/htdocs/app/code/Magento/Backend/App/Action/Plugin/MassactionKey.php(33): Magento\ImportExport\Controller\Adminhtml\Export\Export\Interceptor->Magento\ImportExport\Controller\Adminhtml\Export\Export\{closure}(Object(Magento\Framework\App\Request\Http))
#31 [internal function]: Magento\Backend\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\ImportExport\Controller\Adminhtml\Export\Export\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#32 /srv/www/htdocs/var/generation/Magento/ImportExport/Controller/Adminhtml/Export/Export/Interceptor.php(101): call_user_func_array(Array, Array)
#33 /srv/www/htdocs/var/generation/Magento/ImportExport/Controller/Adminhtml/Export/Export/Interceptor.php(138): Magento\ImportExport\Controller\Adminhtml\Export\Export\Interceptor->___callPlugins('dispatch', Array, Array)
#34 /srv/www/htdocs/lib/internal/Magento/Framework/App/FrontController.php(113): Magento\ImportExport\Controller\Adminhtml\Export\Export\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#35 /srv/www/htdocs/lib/internal/Magento/Framework/App/FrontController.php(70): Magento\Framework\App\FrontController->processRequest(Object(Magento\Framework\App\Request\Http))
#36 [internal function]: Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#37 /srv/www/htdocs/var/generation/Magento/Framework/App/FrontController/Interceptor.php(56): call_user_func_array(Array, Array)
#38 /srv/www/htdocs/lib/internal/Magento/Framework/Interception/Chain/Chain.php(65): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#39 /srv/www/htdocs/var/generation/Magento/Framework/App/FrontController/Interceptor.php(95): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#40 /srv/www/htdocs/lib/internal/Magento/Framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\App\FrontController\{closure}(Object(Magento\Framework\App\Request\Http))
#41 [internal function]: Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#42 /srv/www/htdocs/var/generation/Magento/Framework/App/FrontController/Interceptor.php(100): call_user_func_array(Array, Array)
#43 /srv/www/htdocs/var/generation/Magento/Framework/App/FrontController/Interceptor.php(124): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#44 /srv/www/htdocs/lib/internal/Magento/Framework/App/Http.php(115): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#45 /srv/www/htdocs/lib/internal/Magento/Framework/App/Bootstrap.php(245): Magento\Framework\App\Http->launch()
#46 /srv/www/htdocs/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#47 {main}

Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'entity_value.entity_type_id' in 'on clause', query was: SELECT `entity`.`sku`, `super_attribute`.`product_id`, `attribute`.`attribute_code`, `option_value`.`value` AS `option_title`, `attribute_pricing`.`pricing_value`, `attribute_pricing`.`is_percent` AS `pricing_is_percent` FROM `catalog_product_super_attribute` AS `super_attribute`
 INNER JOIN `catalog_product_super_link` AS `product_link` ON product_link.parent_id = super_attribute.product_id
 INNER JOIN `eav_attribute` AS `attribute` ON attribute.attribute_id = super_attribute.attribute_id
 INNER JOIN `catalog_product_entity` AS `entity` ON entity.entity_id = product_link.product_id
 INNER JOIN `catalog_product_entity_int` AS `entity_value` ON entity_value.entity_type_id = '' AND entity_value.attribute_id = super_attribute.attribute_id AND entity_value.store_id = 0 AND entity_value.entity_id = product_link.product_id
 LEFT JOIN `eav_attribute_option_value` AS `option_value` ON option_value.option_id = entity_value.value AND option_value.store_id = 0
 LEFT JOIN `catalog_product_super_attribute_pricing` AS `attribute_pricing` ON super_attribute.product_super_attribute_id = attribute_pricing.product_super_attribute_id AND entity_value.value = attribute_pricing.value_index WHERE (super_attribute.product_id = '1')' in /srv/www/htdocs/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:235
Stack trace:
#0 /srv/www/htdocs/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php(95): Zend_Db_Statement_Pdo->_execute(Array)
#1 /srv/www/htdocs/vendor/magento/zendframework1/library/Zend/Db/Statement.php(303): Magento\Framework\DB\Statement\Pdo\Mysql->_execute(Array)
#2 /srv/www/htdocs/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /srv/www/htdocs/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `entity`...', Array)
#4 /srv/www/htdocs/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `entity`...', Array)
#5 /srv/www/htdocs/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(737): Magento\Framework\DB\Adapter\Pdo\Mysql->query(Object(Magento\Framework\DB\Select), Array)
#6 /srv/www/htdocs/app/code/Magento/ConfigurableProduct/Model/Resource/Product/Type/Configurable.php(218): Zend_Db_Adapter_Abstract->fetchAll(Object(Magento\Framework\DB\Select))
#7 /srv/www/htdocs/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php(1025): Magento\ConfigurableProduct\Model\Resource\Product\Type\Configurable->getConfigurableOptions(Object(Magento\Catalog\Model\Product\Interceptor), Array)
#8 /srv/www/htdocs/app/code/Magento/ConfigurableImportExport/Model/Export/RowCustomizer.php(35): Magento\ConfigurableProduct\Model\Product\Type\Configurable->getConfigurableOptions(Object(Magento\Catalog\Model\Product\Interceptor))
#9 /srv/www/htdocs/app/code/Magento/CatalogImportExport/Model/Export/RowCustomizer/Composite.php(43): Magento\ConfigurableImportExport\Model\Export\RowCustomizer->prepareData(Object(Magento\Catalog\Model\Resource\Product\Collection), Array)
#10 /srv/www/htdocs/app/code/Magento/CatalogImportExport/Model/Export/Product.php(790): Magento\CatalogImportExport\Model\Export\RowCustomizer\Composite->prepareData(Object(Magento\Catalog\Model\Resource\Product\Collection), Array)
#11 /srv/www/htdocs/app/code/Magento/CatalogImportExport/Model/Export/Product.php(757): Magento\CatalogImportExport\Model\Export\Product->getExportData()
#12 /srv/www/htdocs/app/code/Magento/ImportExport/Model/Export.php(175): Magento\CatalogImportExport\Model\Export\Product->export()
#13 /srv/www/htdocs/app/code/Magento/ImportExport/Controller/Adminhtml/Export/Export.php(45): Magento\ImportExport\Model\Export->export()
#14 /srv/www/htdocs/var/generation/Magento/ImportExport/Controller/Adminhtml/Export/Export/Interceptor.php(123): Magento\ImportExport\Controller\Adminhtml\Export\Export->execute()
#15 /srv/www/htdocs/lib/internal/Magento/Framework/App/Action/Action.php(102): Magento\ImportExport\Controller\Adminhtml\Export\Export\Interceptor->execute()
#16 /srv/www/htdocs/app/code/Magento/Backend/App/AbstractAction.php(221): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#17 [internal function]: Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#18 /srv/www/htdocs/var/generation/Magento/ImportExport/Controller/Adminhtml/Export/Export/Interceptor.php(57): call_user_func_array(Array, Array)
#19 /srv/www/htdocs/lib/internal/Magento/Framework/Interception/Chain/Chain.php(65): Magento\ImportExport\Controller\Adminhtml\Export\Export\Interceptor->___callParent('dispatch', Array)
#20 /srv/www/htdocs/lib/internal/Magento/Framework/Interception/Chain/Chain.php(58): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\ImportE...', 'dispatch', Object(Magento\ImportExport\Controller\Adminhtml\Export\Export\Interceptor), Array, 'adminAuthentica...')
#21 /srv/www/htdocs/app/code/Magento/Backend/App/Action/Plugin/Authentication.php(96): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#22 [internal function]: Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\ImportExport\Controller\Adminhtml\Export\Export\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#23 /srv/www/htdocs/lib/internal/Magento/Framework/Interception/Chain/Chain.php(63): call_user_func_array(Array, Array)
#24 /srv/www/htdocs/lib/internal/Magento/Framework/Interception/Chain/Chain.php(58): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\ImportE...', 'dispatch', Object(Magento\ImportExport\Controller\Adminhtml\Export\Export\Interceptor), Array, 'designLoader')
#25 /srv/www/htdocs/lib/internal/Magento/Framework/App/Action/Plugin/Design.php(39): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#26 [internal function]: Magento\Framework\App\Action\Plugin\Design->aroundDispatch(Object(Magento\ImportExport\Controller\Adminhtml\Export\Export\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#27 /srv/www/htdocs/lib/internal/Magento/Framework/Interception/Chain/Chain.php(63): call_user_func_array(Array, Array)
#28 /srv/www/htdocs/var/generation/Magento/ImportExport/Controller/Adminhtml/Export/Export/Interceptor.php(96): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\ImportE...', 'dispatch', Object(Magento\ImportExport\Controller\Adminhtml\Export\Export\Interceptor), Array, 'adminMassaction...')
#29 /srv/www/htdocs/app/code/Magento/Backend/App/Action/Plugin/MassactionKey.php(33): Magento\ImportExport\Controller\Adminhtml\Export\Export\Interceptor->Magento\ImportExport\Controller\Adminhtml\Export\Export\{closure}(Object(Magento\Framework\App\Request\Http))
#30 [internal function]: Magento\Backend\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\ImportExport\Controller\Adminhtml\Export\Export\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#31 /srv/www/htdocs/var/generation/Magento/ImportExport/Controller/Adminhtml/Export/Export/Interceptor.php(101): call_user_func_array(Array, Array)
#32 /srv/www/htdocs/var/generation/Magento/ImportExport/Controller/Adminhtml/Export/Export/Interceptor.php(138): Magento\ImportExport\Controller\Adminhtml\Export\Export\Interceptor->___callPlugins('dispatch', Array, Array)
#33 /srv/www/htdocs/lib/internal/Magento/Framework/App/FrontController.php(113): Magento\ImportExport\Controller\Adminhtml\Export\Export\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#34 /srv/www/htdocs/lib/internal/Magento/Framework/App/FrontController.php(70): Magento\Framework\App\FrontController->processRequest(Object(Magento\Framework\App\Request\Http))
#35 [internal function]: Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#36 /srv/www/htdocs/var/generation/Magento/Framework/App/FrontController/Interceptor.php(56): call_user_func_array(Array, Array)
#37 /srv/www/htdocs/lib/internal/Magento/Framework/Interception/Chain/Chain.php(65): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#38 /srv/www/htdocs/var/generation/Magento/Framework/App/FrontController/Interceptor.php(95): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#39 /srv/www/htdocs/lib/internal/Magento/Framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\App\FrontController\{closure}(Object(Magento\Framework\App\Request\Http))
#40 [internal function]: Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#41 /srv/www/htdocs/var/generation/Magento/Framework/App/FrontController/Interceptor.php(100): call_user_func_array(Array, Array)
#42 /srv/www/htdocs/var/generation/Magento/Framework/App/FrontController/Interceptor.php(124): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#43 /srv/www/htdocs/lib/internal/Magento/Framework/App/Http.php(115): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#44 /srv/www/htdocs/lib/internal/Magento/Framework/App/Bootstrap.php(245): Magento\Framework\App\Http->launch()
#45 /srv/www/htdocs/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#46 {main} [] []
@vpelipenko vpelipenko added MX bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development labels May 5, 2015
@vpelipenko
Copy link
Contributor

Internal ticket: MAGETWO-37046, MAGETWO-36793

@vpelipenko
Copy link
Contributor

@yukoff, fix for this issue is already available in version 0.74.0-beta8. You can checkout it and try. If you still have some problems, please, reply here.

@yukoff
Copy link
Author

yukoff commented May 15, 2015

Thanks, it seems to be ok now.

@kokoc
Copy link
Member

kokoc commented May 18, 2015

@yukoff Thank you for helping us make Magento better! Closing the issue.

@kokoc kokoc closed this as completed May 18, 2015
magento-team pushed a commit that referenced this issue Jun 24, 2017
VitaliyBoyko pushed a commit to VitaliyBoyko/magento2 that referenced this issue Jun 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: needs update
Projects
None yet
Development

No branches or pull requests

3 participants