Magento路由问题

时间:2015-11-03 17:40:29

标签: php magento

我目前因路由问题半天被阻止,而且我找不到任何解决方案。我在管理员菜单上添加了一个标签,此标签的操作是触发前控制器达到100个路由器匹配迭代'。 我看到的所有帖子都在其他案例中,我做了修复https://github.com/convenient/magento-ce-ee-config-corruption-bug#the-fix而没有任何更改。 所有缓存都被清除,所以我提供数据,如果有人能够提供帮助,我们将不胜感激。

我的架构是:

Booking/etc/adminhtml.xml
Booking/etc/config.xml
Booking/controllers/ContactRequestController.php

adminhtml.xml

<config>
        <menu>
            <customer>
                <children>
                    <ContactRequest translate="title" module="whatever_booking">
                        <title>Contact Requests</title>
                        <action>Whatever_Booking/ContactRequest</action>
                    </ContactRequest>
                </children>
            </customer>
        </menu>
        <acl>
            <resources>
                <admin>
                    <children>
                        <customer>
                            <children>
                                <ContactRequest translate="title" module="whatever_booking">
                                    <title>Contact Request Menu</title>
                                    <sort_order>1</sort_order>
                                    <children>
                                        <example>
                                            <title>Contact Requests</title>
                                        </example>
                                    </children>
                                </ContactRequest>
                            </children>
                        </customer>

                    </children>
                </admin>
            </resources>
    </acl>
</config >

config.xml中

<config>
    <modules>
        <Whatever_Booking>
            <version>0.1</version>
        </Whatever_Booking>
    </modules>
    <admin>
        <routers>
            <whatever_booking>
                <use>admin</use>
                <args>
                    <modules>

                        <Whatever_Booking>Whatever_Booking</Whatever_Booking>
                        <frontName>booking</frontName>
                    </modules>
                </args>
            </whatever_booking>
        </routers>
    </admin>
    <global>
<config>

控制器

class Whatever_Booking_ContactRequestController extends Mage_Adminhtml_Controller_Action {

    public function indexAction()
    {
        Mage::log('controller',null,'test.log');
        // this log isnt displayed, i got the error before
    }
}

1 个答案:

答案 0 :(得分:1)

第一眼猜测它与你的外壳有关。

也许使用此工具生成这个确切的管理页面并比较代码会显示您需要做出的更改?

http://silksoftware.com/magento-module-creator