DPDBeNeLux / magento-DPD_Shipping

Let op: er zijn nieuwe DPD plugins (BETA versie) beschikbaar met belangrijke nieuwe functionaliteiten. De oude plugins zullen na Brexit niet meer goed functioneren, download daarom de nieuwe versie op Github/DPDconnect.
11 stars 10 forks source link

Admin > Sales > DPD Orders Integrity constraint violation: 1052 Column 'shipping_method' in where clause is ambiguous #37

Closed versedi closed 9 years ago

versedi commented 9 years ago

Straight after installation, entering admin grid is causing:

There has been an error processing your request

SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'shipping_method' in where clause is ambiguous, query was: SELECT COUNT(*) FROM `sales_flat_order_grid` AS `main_table`
 INNER JOIN `sales_flat_order` AS `sfo` ON sfo.entity_id=`main_table`.entity_id
 INNER JOIN `sales_flat_order` ON main_table.entity_id = sales_flat_order.entity_id
 INNER JOIN `sales_flat_order_address` ON main_table.entity_id = sales_flat_order_address.parent_id AND sales_flat_order_address.address_type='billing' WHERE (shipping_method LIKE '%dpd%')

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

Magento 1.9.2.1 Testing environment, PHP 5.5.9-1ubuntu4.11 , MySQL Server version: 5.5.44-0ubuntu0.14.04.1 - (Ubuntu)

mvgucht commented 9 years ago

Suspected duplicate issue: https://github.com/DPDBeNeLux/magento-DPD_Shipping/issues/1

Please try the proposed fix there. if the problem consists, please do not hesitate to contact me.