2012-12-20 56 views
0

我在magento admin的admin选项卡中创建了一个自定义菜单。它在localhost上工作完美,但是当我在服务器上部署我的代码时,它给出了一个404页未找到的错误。那里可能是什么问题!自定义菜单为服务器上的magento提供了404

<?xml version="1.0"?> 

<config> 
    <modules> 
     <Inchoo_CoffeeFreak> 
      <version>0.1.0</version> 
     </Inchoo_CoffeeFreak> 
    </modules> 

    <global> 
     <blocks> 
      <coffefreakblock1> 
       <class>Inchoo_CoffeeFreak_Block</class> 
      </coffefreakblock1> 
      <coffefreakblock2> 
       <class>Inchoo_CoffeeFreak_Block_EditSpecial</class> 
      </coffefreakblock2> 
     </blocks> 
     <helpers> 
      <coffefreakhelper1> 
       <class>Inchoo_CoffeeFreak_Helper</class> 
      </coffefreakhelper1> 
     </helpers> 
    </global>  






    <admin> 
     <routers> 
      <samplerouter1> 
       <use>admin</use> 
       <args> 
        <module>Inchoo_CoffeeFreak_AdminControllersHere</module> 
        <frontName>print</frontName> 
        <modules> 
         <sintax after="Inchoo_CoffeeFreak_AdminControllersHere">Mage_Adminhtml</sintax> 
        </modules> 
       </args> 
      </samplerouter1>   
     </routers>  
    </admin> 





    <adminhtml> 


     <menu> 
      <mymenu1 translate="title" module="coffefreakhelper1"> 
       <title>PrintInfo</title> 
       <sort_order>20</sort_order> 
       <children> 
       <!-- Note the misleading "module" attribute. 
        It actualy refers to one of the declared helpers --> 

        <myitem1 translate="title" module="coffefreakhelper1"> 
         <title>Add/Change Config</title> 
         <action>samplerouter1/settings</action> 
         <sort_order>1</sort_order>       
        </myitem1>  
       </children> 
      </mymenu1> 
     </menu> 
    </adminhtml>  

</config> 

回答

2

你的服务器可能在Linux上运行,这是区分大小写的,所以你需要检查你的模块文件和文件夹应该是Magento标准的控制器应该是IndexController而不是indexController

和你的本地主机上运行的窗口不区分大小写。

1

正常情况下,这是您登录的时间。注销并重新登录。那么它应该工作。

+0

仍然无法使用! – MJQ

+0

你清除了缓存吗? – Stony

+0

是的,我已经清除! – MJQ

1

假设缓存是关闭/清除

1)注销并重新登录

如果仍然得到一个404错误

2)检查您的服务器错误日志,你也许失踪你的模块帮手文件

+0

仍然无法使用! – MJQ

+0

您是否在服务器错误日志中看到错误?缓存是否关闭/清除? –

+0

让我看看你的config.xml或adminhtml.xml,你有没有acl? –

1

登录进/出,清除缓存,应该是解决方案。

但你可以尝试以下几点(虽然它可能会发现愚蠢)。

1)检查你的XML内容。(用线与本地主机的XML行)
2)斯佩林斯事(希望<sintax>拼写正确的是你的XML)
3)删除不需要的空间(如之前<global>标签)和评论。
4)开始&关闭标签。
5)正确的缩进(这将有助于找到你的破绽,如果它是有)
6) Atlast直接同本地主机xml文件拷贝到您的服务器。

我真的希望这会帮助你找到bug。

相关问题