This website stores cookies. Click here to accept them.cookie information page

Fixing order list problem in magento 1.7.0.2

9th September 2012
Categories: fixes, magento

Missing order and transaction list in Magento 1.7.0.2

Upgrading Magento to 1.7.0.2 we found an interesting issue. When we logged into the admin site and chose the Sales/Orders or the Sales/Transactions menu, an empty page appeared which contained the header and the footer but nothing else.

An empty page on the Sales/Orders or the Sales/Transactions menu

We looked over the database and the installation files, and everything looked like it was in its right place, so we started investigating the core code. The controller classes which are responsible for listing the orders and the transactions are located in the /app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php and /app/code/core/Mage/Adminhtml/controllers/Sales/TransactionsController.php.

Viewing into the files there is a function called indexAction() which runs when the page is opened.

Comparing the content of this function with the previous version it turned out that one line is missing from the new version which calls the view. The same problem can be found in the gridAction() function which is responsible for the pagination of these lists.

Copying the code from the old version, the two lists appear properly.

Summarizing the solution here are the changes that should be made in the given files.

OrderController.php:

Current(wrong):

public function indexAction()
{
$this->_title($this->__('Sales'))->_title($this->__('Orders'));
$this->_initAction()
->renderLayout();
}
public function gridAction()
{
$this->loadLayout(false);
$this->renderLayout();
}

Working:

public function indexAction()
{
$this->_title($this->__('Sales'))->_title($this->__('Orders'));
$this->_initAction()
->_addContent($this->getLayout()->createBlock('adminhtml/sales_order'))
->renderLayout();
}
public function gridAction()
{
$this->loadLayout();
$this->getResponse()->setBody(
$this->getLayout()->createBlock('adminhtml/sales_order_grid')->toHtml());
}

TransactionsController.php:

Current(wrong):

public function indexAction()
{
$this->_title($this->__('Sales'))
->_title($this->__('Transactions'));
$this->loadLayout()
->_setActiveMenu('sales/transactions')
->renderLayout();
}
public function gridAction()
{
$this->loadLayout(false);
$this->renderLayout();
}

Working:

public function indexAction()
{
$this->_title($this->__('Sales'))
->_title($this->__('Transactions'));
$this->loadLayout()
->_setActiveMenu('sales/transactions')
->_addContent($this->getLayout()->createBlock('adminhtml/sales_transactions'))
->renderLayout();
}
public function gridAction()
{
$this->loadLayout();
$this->getResponse()->setBody(
$this->getLayout()->createBlock('adminhtml/sales_transactions_grid')->toHtml());
}


Add your comment for "Fixing order list problem in magento 1.7.0.2":

Hi

I have the same problem on fresh install.
It works for me. The problem is that It show blank page even if I click on any order from list.
Even BILLING AGREEMENTS and SYSTEM->ORDER STATUSES are emty.

Jan?i, 21 Feb 2013

© Alberon Ltd 2017

8 Standingford House
26 Cave Street
Oxford
OX4 1BA

01865 596 144

Oxford Web is a trading name of Alberon Ltd, registered company no. 5765707 (England & Wales).