cancel
Showing results for 
Search instead for 
Did you mean: 

Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[42S22]: Column not found: 1054 Unknown column '

Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[42S22]: Column not found: 1054 Unknown column '

Hello everyone,

 

I have a problem with my shop. When a customer want to login, this error appear:

 

2 exception(s):
Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'customer_id' in 'where clause', query was: SELECT `main_table`.* FROM `mageplaza_blog_author` AS `main_table` WHERE (`customer_id` = '3295')
Exception #1 (PDOException): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'customer_id' in 'where clause'

Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'customer_id' in 'where clause', query was: SELECT `main_table`.* FROM `mageplaza_blog_author` AS `main_table` WHERE (`customer_id` = '3295')
#0 /home/doyaci/public_html/vendor/magento/framework/DB/Statement/Pdo/Mysql.php(93): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/doyaci/public_html/vendor/magento/zendframework1/library/Zend/Db/Statement.php(303): Magento\Framework\DB\Statement\Pdo\Mysql->_execute(Array)
#2 /home/doyaci/public_html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/doyaci/public_html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `main_ta...', Array)
#4 /home/doyaci/public_html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(533): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `main_ta...', Array)
#5 /home/doyaci/public_html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(596): Magento\Framework\DB\Adapter\Pdo\Mysql->_query('SELECT `main_ta...', Array)
#6 /home/doyaci/public_html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(737): Magento\Framework\DB\Adapter\Pdo\Mysql->query(Object(Magento\Framework\DB\Select), Array)
#7 /home/doyaci/public_html/vendor/magento/framework/Data/Collection/Db/FetchStrategy/Query.php(21): Zend_Db_Adapter_Abstract->fetchAll(Object(Magento\Framework\DB\Select), Array)
#8 /home/doyaci/public_html/vendor/magento/framework/Data/Collection/AbstractDb.php(774): Magento\Framework\Data\Collection\Db\FetchStrategy\Query->fetchAll(Object(Magento\Framework\DB\Select), Array)
#9 /home/doyaci/public_html/vendor/magento/framework/Data/Collection/AbstractDb.php(670): Magento\Framework\Data\Collection\AbstractDb->_fetchAll(Object(Magento\Framework\DB\Select))
#10 /home/doyaci/public_html/vendor/magento/framework/Data/Collection/AbstractDb.php(574): Magento\Framework\Data\Collection\AbstractDb->getData()
#11 /home/doyaci/public_html/vendor/magento/framework/Data/Collection/AbstractDb.php(559): Magento\Framework\Data\Collection\AbstractDb->loadWithFilter(false, false)
#12 /home/doyaci/public_html/vendor/magento/framework/Data/Collection.php(298): Magento\Framework\Data\Collection\AbstractDb->load()
#13 /home/doyaci/public_html/vendor/mageplaza/magento-2-blog-extension/Helper/Data.php(292): Magento\Framework\Data\Collection->getFirstItem()
#14 /home/doyaci/public_html/vendor/mageplaza/magento-2-blog-extension/Plugin/Customer/LinkMenu.php(64): Mageplaza\Blog\Helper\Data->getCurrentAuthor()
#15 /home/doyaci/public_html/vendor/magento/framework/Interception/Interceptor.php(146): Mageplaza\Blog\Plugin\Customer\LinkMenu->afterGetLinks(Object(Magento\Customer\Block\Account\Navigation\Interceptor), Array)
#16 /home/doyaci/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Customer\Block\Account\Navigation\Interceptor->Magento\Framework\Interception\{closure}()
#17 /home/doyaci/public_html/generated/code/Magento/Customer/Block/Account/Navigation/Interceptor.php(26): Magento\Customer\Block\Account\Navigation\Interceptor->___callPlugins('getLinks', Array, Array)
#18 /home/doyaci/public_html/vendor/magento/framework/View/Element/Html/Links.php(77): Magento\Customer\Block\Account\Navigation\Interceptor->getLinks()
#19 /home/doyaci/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(667): Magento\Framework\View\Element\Html\Links->_toHtml()
#20 /home/doyaci/public_html/generated/code/Magento/Customer/Block/Account/Navigation/Interceptor.php(466): Magento\Framework\View\Element\AbstractBlock->toHtml()
#21 /home/doyaci/public_html/vendor/magento/framework/View/Layout.php(558): Magento\Customer\Block\Account\Navigation\Interceptor->toHtml()
#22 /home/doyaci/public_html/vendor/magento/framework/View/Layout.php(534): Magento\Framework\View\Layout->_renderBlock('customer_accoun...')
#23 /home/doyaci/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('customer_accoun...')
#24 /home/doyaci/public_html/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('customer_accoun...')
#25 /home/doyaci/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('customer_accoun...', true)
#26 /home/doyaci/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(511): Magento\Framework\View\Layout\Interceptor->renderElement('customer_accoun...', true)
#27 /home/doyaci/public_html/vendor/magento/module-theme/view/frontend/templates/html/collapsible.phtml(16): Magento\Framework\View\Element\AbstractBlock->getChildHtml()
#28 /home/doyaci/public_html/vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/home/doyaci/pu...')
#29 /home/doyaci/public_html/vendor/magento/framework/View/Element/Template.php(270): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Framework\View\Element\Template), '/home/doyaci/pu...', Array)
#30 /home/doyaci/public_html/vendor/magento/framework/View/Element/Template.php(300): Magento\Framework\View\Element\Template->fetchView('/home/doyaci/pu...')
#31 /home/doyaci/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(667): Magento\Framework\View\Element\Template->_toHtml()
#32 /home/doyaci/public_html/vendor/magento/framework/View/Layout.php(558): Magento\Framework\View\Element\AbstractBlock->toHtml()
#33 /home/doyaci/public_html/vendor/magento/framework/View/Layout.php(534): Magento\Framework\View\Layout->_renderBlock('sidebar.main.ac...')
#34 /home/doyaci/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('sidebar.main.ac...')
#35 /home/doyaci/public_html/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('sidebar.main.ac...')
#36 /home/doyaci/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('sidebar.main.ac...', false)
#37 /home/doyaci/public_html/vendor/magento/framework/View/Layout.php(586): Magento\Framework\View\Layout\Interceptor->renderElement('sidebar.main.ac...', false)
#38 /home/doyaci/public_html/vendor/magento/framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('sidebar.main', false)
#39 /home/doyaci/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('sidebar.main')
#40 /home/doyaci/public_html/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('sidebar.main')
#41 /home/doyaci/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('sidebar.main', false)
#42 /home/doyaci/public_html/vendor/magento/framework/View/Layout.php(586): Magento\Framework\View\Layout\Interceptor->renderElement('sidebar.main', false)
#43 /home/doyaci/public_html/vendor/magento/framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('div.sidebar.mai...', false)
#44 /home/doyaci/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('div.sidebar.mai...')
#45 /home/doyaci/public_html/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('div.sidebar.mai...')
#46 /home/doyaci/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('div.sidebar.mai...', false)
#47 /home/doyaci/public_html/vendor/magento/framework/View/Layout.php(586): Magento\Framework\View\Layout\Interceptor->renderElement('div.sidebar.mai...', false)
#48 /home/doyaci/public_html/vendor/magento/framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('columns', false)
#49 /home/doyaci/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('columns')
#50 /home/doyaci/public_html/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('columns')

But when the costumer come back on the homepage, he is logged.

I did upgrade, deploy, redindex, cache clean and cache flush but nothing.

 

Configuration :

- Magento ver 2.2.5

- PHP Version 7.1.33

Thanks to help me.

 

Best Regards

1 REPLY 1

Re: Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[42S22]: Column not found: 1054 Unknown colu

Hello @souldoyaci 

 

Can you please compare https://github.com/mageplaza/magento-2-blog/blob/master/Setup/UpgradeSchema.php with your current installed extension.

 

If they are not the same, then please update your current extension.

 

Before you update, please take backup of file and database.

 

Thank you.

Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.