1

I have written a small module that has a page on the backend. On a test server it works fine (it works on windows). Once installed on the Battle Server (FreeBSD), while trying to go to the page of the module have a 404 error.

The first thing that came to mind, it's case letters (as developed for Windows).

The configuration of the router is: config.xml

<admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <ZM_Background before="Mage_Adminhtml">ZM_Background_Adminhtml</ZM_Background>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

adminhtml.xml

<config>
    <menu>
        <background translate="title" module="background">
            <title>Media</title>
            <sort_order>50</sort_order>
            <children>
                <items translate="title" module="background">
                    <title>Manage backgrounds</title>
                    <sort_order>0</sort_order>
                    <action>adminhtml/zm_background</action>
                </items>
            </children>
        </background>
    </menu>
</config>

In this configuration, I have a 404 but if I change the register on line

<action>adminhtml/ZM_Background</action>

In this case, the URL in the administration panel module has caps that are not very nice. Help to understand what files you need to check for the register that would fix it. Thanks.

so, too, is working

<action>adminhtml/ZM_background</action>
4
  • Please add your filenames with paths (it's about directories and files lettercases probably).
    – versedi
    Commented Dec 23, 2015 at 13:45
  • Try changing your ZM_Background tag in <modules> to all lowercase. Commented Dec 23, 2015 at 14:20
  • @Joseph. Thanks, but it does not work(. So, too, the way work <action> adminhtml / ZM_background </ action>
    – Dmitry Zar
    Commented Dec 23, 2015 at 14:52
  • @versedi, I make a screenshot and will update the post.
    – Dmitry Zar
    Commented Dec 23, 2015 at 14:57

1 Answer 1

1

I solved the problem, but the cause until the end and did not understand ... If you change the path to the controller other than the namespace of the module, the router is working properly.

For example, if

<action>adminhtml/zm_background</action>

replace to

<action>adminhtml/test_background</action>

and change the way

ZM\Background\controllers\Adminhtml\ZM\BackgroundController.php

on

ZM\Background\controllers\Adminhtml\Test\BackgroundController.php

so the controller starts working normally, with small letters...

Maybe it's due to the fact that the use namespace twice, or two uppercase characters in the address or something like that ... but a solution is found, and it suits me)

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.