Magento Extension从管理面板导致404错误

时间:2015-08-03 15:40:36

标签: magento

我们的网站上有一个由前雇员撰写的Magento扩展程序。这个扩展名是为这个网站编写的,我正在努力找出这个扩展名出了什么问题。事实证明联系前雇员(我应该怎么做),这是解决这个问题的一种无效方法,所以我希望有人可以帮助我。

扩展程序在网站上运行良好,但是当我们点击后端的扩展程序时,在管理面板上,我们收到“404 Not Found 1”错误。

  • 我能做些什么(比如更改日志文件设置)以找出丢失的文件并导致这个404?

快速更新

在回滚大量补丁之后,我们注意到这个问题只发生在补丁5994之后。补丁5994中是否有任何可能导致这些问题的内容?

扩展程序本身包含以下文件:

Controller file was loaded but class does not exist

我可以更改config.xml中的班级名称,而不是收到404错误,我会收到一封实际的崩溃报告,说明<?xml version="1.0"?> <config> <modules> <muz_Worldman> <version>1.0.0</version> </muz_Worldman> </modules> <global> <helpers> <worldman> <class>muz_Worldman_Helper</class> </worldman> </helpers> </global> <frontend> <routers> <worldman> <use>standard</use> <args> <module>muz_Worldman</module> <frontName>worldman</frontName> </args> </worldman> </routers> <layout> <updates> <worldman> <file>worldman.xml</file> </worldman> </updates> </layout> </frontend> <adminhtml> <menu> <cms> <children> <worldman_adminform translate="title" module="worldman"> <title>Worldman Manager</title> <action>worldman/adminhtml_worldman</action> </worldman_adminform> </children> </cms> </menu> <acl> <resources> <all> <title>Allow Everything</title> </all> <admin> <children> <cms> <children> <worldman_adminform> <title>worldman Manager</title> </worldman_adminform> </children> </cms> </children> </admin> </resources> </acl> <layout> <updates> <worldman> <file>worldman.xml</file> </worldman> </updates> </layout> </adminhtml> </config>

同样,此扩展程序在网站上运行正常。它只是从导致404的管理面板菜单中单击扩展名本身。

启用了扩展程序。我已经退出并退回了一百次。索引已重新编入索引。缓存已被清除并关闭。服务器已重新启动。但无济于事。

此时,我们非常感谢任何有关调试任何Magento扩展的建议。

如果这有帮助,这里是const文件:

{{1}}

1 个答案:

答案 0 :(得分:1)

ACL设置没有为用户设置正确,这就是为什么你得到404.即使ACL设置正确,如果你不刷新Magento配置缓存并注销然后再输出,你可能会收到此错误又回来了。

通过快速查看配置,似乎ACL设置的XML部分没问题,但您可能需要检查文件sys.path.insert(0, "/usr/local/lib/python2.7/dist-packages")是否有类似这样的方法:

\app\code\local\muz\Worldman\controllers\Adminhtml\WorldmanController.php

我有一堆模块在Magento的最新补丁之后因为这种缺失的方法而停止工作。

另外,您是否尝试过自动拥有完全访问权限的管理员帐户?

<强> -------- EDIT -------

你提到的补丁(5994)给了我一个模块的类似问题。它使用了adminhtml-controller的前端路由,所以我要做的是删除protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('cms/worldman_adminform'); } 之间的XML并用以下内容替换它:

<frontend>...</frontend>

并确保用于ACL操作的XML - <admin> <routers> <adminhtml> <args> <modules> <muz_Worldman after="Mage_Adminhtml">muz_Worldman_Adminhtml</muz_Worldman> </modules> </args> </adminhtml> <worldman> <use>admin</use> <args> <module>muz_Worldman</module> <frontName>worldman</frontName> </args> </worldman> </routers> </admin> 是正确的,我必须对URL进行一些更改,以便我的更像(对你而言)<action>worldman/adminhtml_worldman</action>

相关问题