通过管理面板访问模块设置时出现Magento 404错误 [英] Getting a Magento 404 error when accessing the module settings through admin panel

查看:83
本文介绍了通过管理面板访问模块设置时出现Magento 404错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我下载了Magento免费博客扩展程序,但它仅支持一个博客. 所以我复制了扩展名,因为我的magento商店中需要多个博客.我在我的扩展副本中适当地更改了所有引用和调用,并能够将其安装为单独的扩展.

So I downloaded the Magento free blog extension but it only supports a single blog. So I duplicated the extension as I need more than one blog in my magento store. I changed all the references and calls appropriately in my extension copy and was able to install it as a separate extension.

但是当我想从管理面板创建新帖子时,它给了我Magento 404错误.

如果有人可以看看并让我知道我所缺少的,我将不胜感激.

I would appreciate if someone could take a look and let me know what I am missing.

请注意,我使用两种环境进行测试:

Please NOTE that I use two environments for testing:

  1. 通过MAMP/WAMP(适用于Mac和Windows的预打包LAMP桌面环境)在PHP 5.2.6,MySQL 5和Apache 2.0.59上进行的Magento本地安装

  1. a local installation of Magento through MAMP/WAMP (prepackaged LAMP desktop environment for Mac and Windows) with PHP 5.2.6, MySQL 5 and Apache 2.0.59

具有PHP 5.2.10,MySQL 5.x和Apache 2.x的Web服务器

a Webserver with PHP 5.2.10, MySQL 5.x and Apache 2.x

在本地MAMP/WAMP上,我可以毫无问题地创建博客.但是,当我从实时服务器上对其进行测试时,我不再能够创建新的博客文章,并且重定向到创建文章"页面的管理页面会给我magento 404错误.

我一直在想这可能与某些服务器设置有关,但是我完全不确定,如果有人可以帮我研究一下,我将不胜感激.

I have been thinking that this might have to do with some server settings but I am not sure at all and would appreciate if someone else could look into this for me.

谢谢.

程序员

推荐答案

首先要责骂,然后提供一些帮助,因为这就是StackOverflow滚动的方式.除非您真的熟悉Magento约定,否则您可能没有对足够多的正确事情进行更改.

First a scold, then some help, because that's how StackOverflow rolls. Unless you're really conversant with Magento conventions, chances are you didn't change enough of the right things.

  1. 在Magento中阅读控制器分离程序,然后尝试这样,您现在知道您的姓氏是"vblog_admin".是否加载任何使用该姓氏的页面?如果不是,请检查您的< routers>您的自定义模块部分

    So, that read, you now know your frontname here is "vblog_admin". Are ANY pages with this front name loading? If not, check your <routers> section of your customized module

    您的控制器名称为"manage_vblog",这意味着在自定义模块中,您应该在以下位置有一个控制器:ModuleName/controllers/Manage/Vblog.php.

    Your controller name is "manage_vblog", which means in the customized module you should have a controller at the following location: ModuleName/controllers/Manage/Vblog.php.

    确定控制器到位后,请确保其上具有newAction方法.

    Once you've ensured that controller is in place, make sure it has a newAction method on it.

    如果以上任何步骤失败,则magento会在您身上显示404.最后,在

    If any of the above steps fail, magento will 404 on you. Finally, in

    app/code/core/Mage/Core/Controller/Varien/Router/Standard.php
    

    搜索文本getControllerFileName.这是您的控制器获取名称的地方,以及Magento决定是否有合法请求的系统一般区域.

    Search for the text getControllerFileName. This is where your controller gets its name, as well as the general area of the system where Magento decides if it has a legitimate request or not.

    更新:根据下面提供的文件(和私人通讯),似乎是导致问题的原因是您的命名约定. Magento对骆驼案的命名约定非常严格

    Update: Based on the file provided below (and private communication) it looks like it's your naming conventions that are causing the problem. Magento is extrodinarly strict about its camel case naming convention

    VBlog 
    

    应该是

    Vblog
    

    在类和文件名的所有实例中.虽然PHP本身并不关心类名的大小写,但是msot linux服务器却关心大小写.因此,Magento无法找到您的控制器类文件,这就是为什么要获取404的原因.

    in all instances of class and filenames. While PHP itself doesn't care about case in classnames, msot linux servers DO case about case. Magento can't find your controller class file because of this and that's why you're getting a 404.

    这篇关于通过管理面板访问模块设置时出现Magento 404错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆