0

I am using magento 1.9 and when I click on manage products tab app crashed and return Error log record number: 579144440716

I checked my error logs against records number and here is the error history

 a:5:{i:0;s:448:"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'gc., IF(gc.column_id IS NULL, main_table.visible, gc.is_visible)' in 'field list', query was: SELECT `main_table`., `gc.*, IF(gc.column_id IS NULL, main_table.visible, gc`.`is_visible)` AS `visibility` FROM `amasty_pgrid_grid_column` AS `main_table`
 LEFT JOIN `amasty_pgrid_group_column` AS `gc` ON main_table.entity_id = gc.column_id AND gc.group_id = 0 WHERE (`column_type` = 'standard')";i:1;s:5763:"#0 /var/www/vhosts/vaperite.com/site/pub/includes/src/Varien_Db_Statement_Pdo_Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/vhosts/vaperite.com/site/pub/includes/src/__default.php(72645): Varien_Db_Statement_Pdo_Mysql->_execute(Array)

I have also run all commands like

  1. Cache clean
  2. Index
  3. compilation

but no good luck. Please help on this I have no clue how to fix this issue my site is on live.

  • You have error in your extension in place when you prepare some join - maybe its block for grid or something - and join doesn't right place in db OR there is something wrong directly on db - something that should be in place where this joins hits actually doesnt exist. For more help provide some more code and enable developer mode - maybe some message then displayed would be more helpful. – Bartosz Kubicki Jun 17 '16 at 19:07
  • thanks for your comment .. I export my database dump and run live dump on my staging site and there it works fine. :| – Qubaish Bhatti Jun 17 '16 at 19:15
  • Could you turn off compilation and post a stack trace again? Then we can have a better understanding of where it is coming from. – 7ochem Jun 17 '16 at 19:50
  • ok i disbale the compilation and then track the error log .. same result – Qubaish Bhatti Jun 17 '16 at 23:43
2

This looks like it is likely the result of an installer or upgrade script on the module not having run.

The error states that a column is missing on the table - this column should be added by the install or upgrade scripts on the module. If this hasn't run, then the column is not present, hence the error.

There are two things I would suggest here: first, disable the Amasty Extended Product Grid module by setting the <active> node to 'false' in app/etc/modules/amasty_pgrid.xml

Clear the cache, log out of the admin, and browse a few pages on the frontend of the site. Then set the xml node back to 'true' to re-enable the module, then repeat the action of clearing the cache, browse the front-end and then log back in. This should cause the install script to run again, hopefully correcting the issue.

Second; if the above does not work, then you can also look at the "core_resource" table. Compare the version numbers there to the install scripts in the module's sql folder, and check which script adds the referenced column. It will have a name similar to mysql4-upgrade-1.0.0-1.0.1.php, where the last set of numbers indicates the version number.

Change the version number in core_resource to be lower than that script, e.g. if the script is mysql4-upgrade-2.3.4-2.3.5.php, then change the value in core_resource to 2.3.4. This will cause it to re-run that upgrade script, and hopefully resolve the issue.

If you remove all core_resource entries for the module, it will force the installer to re-run completely as if it had never been then installed.

NOTE: This can cause further issues, and should not be done in production or without taking a backup first

0

Here is the complete error log

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'gc., IF(gc.column_id IS NULL, main_table.visible, gc.is_visible)' in 'field list', query was: SELECT `main_table`., `gc.*, IF(gc.column_id IS NULL, main_table.visible, gc`.`is_visible)` AS `visibility` FROM `amasty_pgrid_grid_column` AS `main_table`
 LEFT JOIN `amasty_pgrid_group_column` AS `gc` ON main_table.entity_id = gc.column_id AND gc.group_id = 0 WHERE (`column_type` = 'standard')";i:1;s:6196:"#0 /var/www/vhosts/vaperite.com/site/pub/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /var/www/vhosts/vaperite.com/site/pub/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /var/www/vhosts/vaperite.com/site/pub/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `main_ta...', Array)
#4 /var/www/vhosts/vaperite.com/site/pub/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `main_ta...', Array)
#5 /var/www/vhosts/vaperite.com/site/pub/lib/Zend/Db/Adapter/Abstract.php(737): Varien_Db_Adapter_Pdo_Mysql->query('SELECT `main_ta...', Array)
#6 /var/www/vhosts/vaperite.com/site/pub/lib/Varien/Data/Collection/Db.php(740): Zend_Db_Adapter_Abstract->fetchAll('SELECT `main_ta...', Array)
#7 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php(521): Varien_Data_Collection_Db->_fetchAll('SELECT `main_ta...', Array)
#8 /var/www/vhosts/vaperite.com/site/pub/lib/Varien/Data/Collection/Db.php(572): Mage_Core_Model_Resource_Db_Collection_Abstract->getData()
#9 /var/www/vhosts/vaperite.com/site/pub/lib/Varien/Data/Collection.php(741): Varien_Data_Collection_Db->load()
#10 /var/www/vhosts/vaperite.com/site/pub/app/code/local/Amasty/Pgrid/Block/Adminhtml/Catalog/Product/Grid.php(288): Varien_Data_Collection->getIterator()
#11 /var/www/vhosts/vaperite.com/site/pub/app/code/local/Amasty/Pgrid/Block/Adminhtml/Catalog/Product/Grid.php(254): Amasty_Pgrid_Block_Adminhtml_Catalog_Product_Grid->_prepareColumnsStandard()
#12 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(624): Amasty_Pgrid_Block_Adminhtml_Catalog_Product_Grid->_prepareColumns()
#13 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(632): Mage_Adminhtml_Block_Widget_Grid->_prepareGrid()
#14 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Core/Block/Abstract.php(918): Mage_Adminhtml_Block_Widget_Grid->_beforeToHtml()
#15 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#16 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('grid', true)
#17 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Adminhtml/Block/Catalog/Product.php(79): Mage_Core_Block_Abstract->getChildHtml('grid')
#18 /var/www/vhosts/vaperite.com/site/pub/app/design/adminhtml/default/default/template/catalog/product.phtml(46): Mage_Adminhtml_Block_Catalog_Product->getGridHtml()
#19 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/vhosts...')
#20 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#21 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#22 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#23 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Adminhtml/Block/Widget/Container.php(308): Mage_Adminhtml_Block_Template->_toHtml()
#24 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Adminhtml_Block_Widget_Container->_toHtml()
#25 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#26 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
#27 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#28 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('content', true)
#29 /var/www/vhosts/vaperite.com/site/pub/app/design/adminhtml/default/default/template/page.phtml(74): Mage_Core_Block_Abstract->getChildHtml('content')
#30 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Core/Block/Template.php(241): include('/var/www/vhosts...')
#31 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#32 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#33 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#34 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Adminhtml_Block_Template->_toHtml()
#35 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#36 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#37 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(180): Mage_Core_Controller_Varien_Action->renderLayout()
#38 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Catalog_ProductController->indexAction()
#39 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#40 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#41 /var/www/vhosts/vaperite.com/site/pub/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#42 /var/www/vhosts/vaperite.com/site/pub/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#43 /var/www/vhosts/vaperite.com/site/pub/index.php(95): Mage::run('', 'store')
#44 {main}";s:3:"url";s:33:"/index.php/admin/catalog_product/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.