3

So I'm trying to make an Admin menu for a module I'm developing. The menu itself displays fine but when I click on it I get a 404 page.

This is my code:

Jiri/Servicepunten/etc/config.xml

<modules>
    <Jiri_Servicepunten>
        <version>1.0.0</version>
    </Jiri_Servicepunten>
</modules>
<admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <Jiri_Servicepunten after="Mage_Adminhtml">Jiri_Servicepunten
                    </Jiri_Servicepunten>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

Jiri/Servicepunten/etc/adminhtml.xml

 <config>
<menu>
    <service translate="title" module="jiri_servicepunten">
        <title>Service</title>
        <sort_order>50</sort_order>
        <children>
            <servicepunten>
                <title>Servicepunten</title>
                <sort_order>1</sort_order>
                <action>adminhtml/Servicepunten</action>
            </servicepunten>
        </children>
    </service>
</menu>

Jiri/Servicepunten/controllers/ServicepuntenController.php

 class Jiri_Servicepunten_ServicepuntenController extends Mage_Adminhtml_Controller_Action{
public function indexAction(){
    $this->loadLayout();
    $this->renderLayout();
}

}

When I try to debug the controller filename in core/Mage/Core/Controller/Varien/Router/Standard.php it looks in the following place:

 app/code//Jiri/Servicepunten/////////////////////////controllers/ServicepuntenController.php"

I'm not sure where all the slashes are coming from. Its in the local pool btw. Anyone have any ideas?

1

Okay, so it turns out my code was okay. Except for where it says

 <Jiri_Servicepunten after="Mage_Adminhtml">Jiri_Servicepunten
 </Jiri_Servicepunten>

All that whitespace between the tags apparently got registered as extra slashes. If I put the closing tag immediatly after the string it works as intended.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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