I'm not sure how to update custom modules to work with the SUPEE-6788 patch, the instructions are not very clear.
Based on Alan Storm's tutorial, I created a simple module in the generator www.silksoftware.com/magento-module-creator/ for testing. It has custom page in admin which works perfectly fine, but when I apply fixes required in SUPEE-6788, the admin page shows 404 error.
URL of the custom admin page is:
localhost/index.php/admin/admin_adminhello/adminhtml_adminhellobackend/index/key/83f08ec4bddff37e47412e16acc8d3f6/
Here's the config of the module:
<config>
<modules>
<Pulsestorm_Adminhello>
<version>0.1.0</version>
</Pulsestorm_Adminhello>
</modules>
<global>
<helpers>
<adminhello>
<class>Pulsestorm_Adminhello_Helper</class>
</adminhello>
</helpers>
<blocks>
<adminhello>
<class>Pulsestorm_Adminhello_Block</class>
</adminhello>
</blocks>
</global>
<admin>
<routers>
<adminhello>
<use>admin</use>
<args>
<module>Pulsestorm_Adminhello</module>
<frontName>admin_adminhello</frontName>
</args>
</adminhello>
</routers>
</admin>
...
Here's the controller:
/app/code/local/Pulsestorm/Adminhello/controllers/Adminhtml/AdminhellobackendController.php
class Pulsestorm_Adminhello_Adminhtml_AdminhellobackendController extends Mage_Adminhtml_Controller_Action
{
public function indexAction()
{
$this->loadLayout();
$this->_title($this->__("My Test Page Title"));
$this->renderLayout();
}
}
Solution
I replaced the <routers>
part based on instructions from the patch like this (probably incorrectly):
<routers>
<adminhtml>
<args>
<modules>
<admin_adminhello after="Mage_Adminhtml">Pulsestorm_Adminhello_Adminhtml</admin_adminhello>
</modules>
</args>
</adminhtml>
</routers>
But now the URL just shows 404 error
:
localhost/index.php/admin/admin_adminhello/adminhtml_adminhellobackend/index/key/83f08ec4bddff37e47412e16acc8d3f6/
How to fix the module correctly for that new patch?
Do I just need to update config.xml
or do I also need to change the admin page's URL after applying this patch?