0
Magento 1.9.1.0
Porto theme 
Apache Version  2.4.25 
MySQL Version 5.6.35 
PHP Version 5.5.38

It worked well forever. I made no changes on my end whatsoever except installed a new version of the calendar by BSSCommerce and Full Page Cache from Amasty. This was all done about a week ago and it worked fine.

I tried everything - restarted mySQL, restarted Apache, rebooted the server (4x). Cleared all Cache (from withing the Admin and also renamed the folder via FTP), re-indexed, disabled Cache, tried to disable the Full Page Cache by Amasty (how do you correctly do that?), tried disabling the calendar. All to no avail.

There has been an error processing your request SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'increment_id' in where clause is ambiguous, query was: SELECT COUNT(*) FROM mg_sales_flat_order_grid AS main_table INNER JOIN mg_sales_flat_order ON main_table.increment_id = mg_sales_flat_order.increment_id WHERE (increment_id LIKE '%3983%')

EDITED: I placed a test order, then click on SALES --) ORDERS and I get the following Error:

There has been an error processing your request
SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'increment_id' in where clause is ambiguous, query was: SELECT COUNT(*) FROM `mg_sales_flat_order_grid` AS `main_table`
 INNER JOIN `mg_sales_flat_order` ON main_table.increment_id = mg_sales_flat_order.increment_id WHERE (increment_id LIKE '%3991%')

Trace:
#0 /home/mySITE/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/mySITE/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/mySITE/public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/mySITE/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT COUNT(*)...', Array)
#4 /home/mySITE/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SELECT COUNT(*)...', Array)
#5 /home/mySITE/public_html/lib/Zend/Db/Adapter/Abstract.php(828): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 /home/mySITE/public_html/lib/Varien/Data/Collection/Db.php(225): Zend_Db_Adapter_Abstract->fetchOne(Object(Varien_Db_Select), Array)
#7 /home/mySITE/public_html/lib/Varien/Data/Collection.php(225): Varien_Data_Collection_Db->getSize()
#8 /home/mySITE/public_html/lib/Varien/Data/Collection.php(211): Varien_Data_Collection->getLastPageNumber()
#9 /home/mySITE/public_html/lib/Varien/Data/Collection/Db.php(516): Varien_Data_Collection->getCurPage()
#10 /home/mySITE/public_html/lib/Varien/Data/Collection/Db.php(563): Varien_Data_Collection_Db->_renderLimit()
#11 /home/mySITE/public_html/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(533): Varien_Data_Collection_Db->load()
#12 /home/mySITE/public_html/app/code/local/Bss/Deliverydate/Block/Adminhtml/Sales/Order/Grid.php(35): Mage_Adminhtml_Block_Widget_Grid->_prepareCollection()
#13 /home/mySITE/public_html/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(626): Bss_Deliverydate_Block_Adminhtml_Sales_Order_Grid->_prepareCollection()
#14 /home/mySITE/public_html/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(632): Mage_Adminhtml_Block_Widget_Grid->_prepareGrid()
#15 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Abstract.php(918): Mage_Adminhtml_Block_Widget_Grid->_beforeToHtml()
#16 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#17 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('grid', true)
#18 /home/mySITE/public_html/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php(77): Mage_Core_Block_Abstract->getChildHtml('grid')
#19 /home/mySITE/public_html/app/design/adminhtml/default/default/template/widget/grid/container.phtml(36): Mage_Adminhtml_Block_Widget_Grid_Container->getGridHtml()
#20 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/mySITE/pu...')
#21 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#22 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#23 /home/mySITE/public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#24 /home/mySITE/public_html/app/code/core/Mage/Adminhtml/Block/Widget/Container.php(308): Mage_Adminhtml_Block_Template->_toHtml()
#25 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Adminhtml_Block_Widget_Container->_toHtml()
#26 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#27 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
#28 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#29 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('content', true)
#30 /home/mySITE/public_html/app/design/adminhtml/default/default/template/page.phtml(74): Mage_Core_Block_Abstract->getChildHtml('content')
#31 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/mySITE/pu...')
#32 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#33 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#34 /home/mySITE/public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#35 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Adminhtml_Block_Template->_toHtml()
#36 /home/mySITE/public_html/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#37 /home/mySITE/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#38 /home/mySITE/public_html/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php(95): Mage_Core_Controller_Varien_Action->renderLayout()
#39 /home/mySITE/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Sales_OrderController->indexAction()
#40 /home/mySITE/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#41 /home/mySITE/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#42 /home/mySITE/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#43 /home/mySITE/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#44 /home/mySITE/public_html/index.php(87): Mage::run('', 'store')
#45 {main}

Error log record number: 979287499550

EDITED again: In the cpanel of my account it currently shows the PHP Version 5.6.30 while I could almost swear it was php5.5 before. Could this be the problem? UPDATE: According to the hosting company - I have PHP Version 5.5.38.

When I open one of the files referenced in the Error message - it has the following Error inside:

a:5:{i:0;s:311:"SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'increment_id' in where clause is ambiguous, query was: SELECT COUNT(*) FROM `mg_sales_flat_order_grid` AS `main_table`
 INNER JOIN `mg_sales_flat_order` ON main_table.increment_id = mg_sales_flat_order.increment_id WHERE (increment_id LIKE '%3991%')";i:1;s:5634:"#0 /home/mySITE/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/mySITE/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/mySITE/public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/mySITE/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT COUNT(*)...', Array)
#4 /home/mySITE/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SELECT COUNT(*)...', Array)
#5 /home/mySITE/public_html/lib/Zend/Db/Adapter/Abstract.php(828): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 /home/mySITE/public_html/lib/Varien/Data/Collection/Db.php(225): Zend_Db_Adapter_Abstract->fetchOne(Object(Varien_Db_Select), Array)
#7 /home/mySITE/public_html/lib/Varien/Data/Collection.php(225): Varien_Data_Collection_Db->getSize()
#8 /home/mySITE/public_html/lib/Varien/Data/Collection.php(211): Varien_Data_Collection->getLastPageNumber()
#9 /home/mySITE/public_html/lib/Varien/Data/Collection/Db.php(516): Varien_Data_Collection->getCurPage()
#10 /home/mySITE/public_html/lib/Varien/Data/Collection/Db.php(563): Varien_Data_Collection_Db->_renderLimit()
#11 /home/mySITE/public_html/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(533): Varien_Data_Collection_Db->load()
#12 /home/mySITE/public_html/app/code/local/Bss/Deliverydate/Block/Adminhtml/Sales/Order/Grid.php(35): Mage_Adminhtml_Block_Widget_Grid->_prepareCollection()
#13 /home/mySITE/public_html/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(626): Bss_Deliverydate_Block_Adminhtml_Sales_Order_Grid->_prepareCollection()
#14 /home/mySITE/public_html/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php(632): Mage_Adminhtml_Block_Widget_Grid->_prepareGrid()
#15 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Abstract.php(918): Mage_Adminhtml_Block_Widget_Grid->_beforeToHtml()
#16 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#17 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('grid', true)
#18 /home/mySITE/public_html/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php(77): Mage_Core_Block_Abstract->getChildHtml('grid')
#19 /home/mySITE/public_html/app/design/adminhtml/default/default/template/widget/grid/container.phtml(36): Mage_Adminhtml_Block_Widget_Grid_Container->getGridHtml()
#20 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/mySITE/pu...')
#21 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#22 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#23 /home/mySITE/public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#24 /home/mySITE/public_html/app/code/core/Mage/Adminhtml/Block/Widget/Container.php(308): Mage_Adminhtml_Block_Template->_toHtml()
#25 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Adminhtml_Block_Widget_Container->_toHtml()
#26 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#27 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
#28 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#29 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('content', true)
#30 /home/mySITE/public_html/app/design/adminhtml/default/default/template/page.phtml(74): Mage_Core_Block_Abstract->getChildHtml('content')
#31 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/mySITE/pu...')
#32 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#33 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#34 /home/mySITE/public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#35 /home/mySITE/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Adminhtml_Block_Template->_toHtml()
#36 /home/mySITE/public_html/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#37 /home/mySITE/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#38 /home/mySITE/public_html/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php(95): Mage_Core_Controller_Varien_Action->renderLayout()
#39 /home/mySITE/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Sales_OrderController->indexAction()
#40 /home/mySITE/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#41 /home/mySITE/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#42 /home/mySITE/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#43 /home/mySITE/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#44 /home/mySITE/public_html/index.php(87): Mage::run('', 'store')
#45 {main}";s:3:"url";s:75:"/index.php/hillegom/sales_order/index/key/a93767a4ea2a49cb2140105a02d152d3/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}

2 Answers 2

0

Create a phpinfo.php file in your Magento root folder with the contents

<?php phpinfo(); ?>

Browse to http://yoursite/phpinfo.php

Whilst not the solution this will tell you exactly what the MySql version running on the server is. A mysql upgrade could be the cause of the problem.

0

It looks like Bss_Deliverydate module is joining sales_flat_order table to the grid table without properly adding labels for each table. Try disabling Bss_Deliverydate module and see if that is the case. If so ask the vendor to fix the issue or try to fix it yourself inside /home/mySITE/public_html/app/code/local/Bss/Deliverydate/Block/Adminhtml/Sales/Order/Grid.php file. If the license of the module permits you can post prepareCollection method from that class here so we can show you what is wrong with it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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