到目前为止我所拥有的:
etc/modules/BugFix_MageAdminhtmlBlockWidgetGrid.xml
<?xml version="1.0"?>
<config>
<modules>
<BugFix_MageAdminhtmlBlockWidgetGrid>
<active>true</active>
<codePool>local</codePool>
<depends>
<Mage_Adminhtml />
</depends>
</BugFix_MageAdminhtmlBlockWidgetGrid>
</modules>
</config>
app/local/BugFix/MageAdminhtmlBlockWidgetGrid/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<BugFix_MageAdminhtmlBlockWidgetGrid>
<version>1.0.0</version>
</BugFix_MageAdminhtmlBlockWidgetGrid>
</modules>
<global>
<blocks>
<mageadminhtmlblockwidgetgrid>
<class>BugFix_MageAdminhtmlBlockWidgetGrid_Block</class>
</mageadminhtmlblockwidgetgrid>
<adminhtml>
<rewrite>
<widget_grid>BugFix_MageAdminhtmlBlockWidgetGrid_Block_Widget_Grid</widget_grid>
</rewrite>
</adminhtml>
</blocks>
</global>
</config>
app/local/BugFix/MageAdminhtmlBlockWidgetGrid/Block/Widget/Grid.php
<?php
class BugFix_MageAdminhtmlBlockWidgetGrid_Block_Widget_Grid extends Mage_Adminhtml_Block_Widget_Grid
{
public function getRowUrl($item)
{
$res = parent::getRowUrl($item);
return ($res ? $res : '#');
}
}
不知何故,上面的代码不起作用。应该是很简单的...
作为一个模块的错误修复适用于 Magento 1.4(并由 Magento 在 1.7 中修复)。