Magento: Fatal error: Call to undefined method Mage_Adminhtml_Block_Widget::getrowurl() in magneto 1.4.2

January 6, 2011 | In: Fatel Error, Magento, php, web development

I installed Magento on my local server. When I tried to add new category then I got a fatel error.
What I did and what I got:

I click on catalog > Manage Categories

I got Fatal error: Call to undefined method Mage_Adminhtml_Block_Widget::getrowurl() in …..app/code/core/Mage/Adminhtml/Block/Widget/Grid.php on line 1607

I tried to find out the error reason then I got my solution. And solution is :

Go To app/code/core/Mage/Adminhtml/Block/Widget/Grid.php

Search function getRowUrl in the file.

public function getRowUrl($item)
{
$res = parent::getRowUrl($item);
return ($res ? $res : '#');
}

Replace this function with below function:

public function getRowUrl($item)
{
$res = parent::getUrl($item);
return ($res ? $res : '#');
}