1

I am trying to fix the admin route issue for a 3rd party module, as required for patch 6788.

The module code sits in a directory directly below 'community' rather than in a namespace directory

i.e

community/TheModule

Upon changing the admin router in the config xml to the following,

  <admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <themodule_admin before="Mage_Adminhtml">Themodule_Adminhtml</themodule_admin>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

the admin routes no longer work, and I can see that this is because the filename Magento is odd

i.e. with debugging logs in the from the _validateControllerClassName method in Mage_Core_Controller_Varien_Router_Standard I can see Magento is looking for files in paths like the following

app/code//TheModule/Adminhtml/controllers/

Ideally the module should be sitting under a namespace, but is there a quick fix I can apply to this module in order to get it patched for 6788?

2
  • You might want to consider mentioning the basic code you started with. You provided a solution that didn't work but it is not possible to see what changed in relation to the earlier code
    – Badger
    Commented Nov 10, 2015 at 15:16
  • Didn't want to go pasting the third party modules code in, 2 reasons, not sure on whether sharing their code is allowed, and second, didn't want it to be a name and shame. So I just had to type up a hypothetical module, with the relevant parts. Ultimately, the problem was the module was not coded correctly, so I had to move the module to a namespace, and make a lot of manual edits to it to fix the issue
    – Chris
    Commented Nov 11, 2015 at 15:19

1 Answer 1

1

So there didn't seem to be a quick fix. Instead copied the module to a namespace directory, updating the XML as required.

Mainly ran into problems because the module was use 'new' to create classes in some places, and referencing a lot of constants using modulename::constant

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.