【问题标题】:Magento Front End 404 ErrorMagento 前端 404 错误
【发布时间】:2014-07-10 14:28:02
【问题描述】:

我是magento的新手,我已经安装并放置了一些产品,但后来我得到了错误:在前端找不到404页面。后端一切正常,我可以访问所有内容,但突然间我不知道这是怎么发生的。我尝试了所有解决方案,如刷新缓存、替换 .htaccess、数据库中的 is_active 字段等,但都证明是徒劳的。然后最近我将 system->Configuration->Web Base_url 设置为http://sportiva.no/index.php/(以前是http://sportiva.no/),一切都完全改变了,所有样式都消失了,我无法保存任何东西。请帮忙,我准备提供后端凭据。 请帮忙

【问题讨论】:

    标签: mysql magento content-management-system


    【解决方案1】:

    转到系统 > 配置 > Web > 默认页面并检查“CMS 主页”字段值。如果是“404 Not Found”,则将其更改为下拉菜单中可用的任何 CMS 页面并保存配置。

    【讨论】:

    • 我已经做到了,但还是一样。你能帮我做吗?
    • 你现在在看吗?
    • 嗨,马哈茂德。我正在调查它。我发现你没有为你的前端设置主题。你的主题名称是什么。
    • ma_sportsshop 是主题
    • 在数据库中转到 core_config_data 并检查 url。
    【解决方案2】:

    参考 Alan Storm 的这个链接,

    http://magento-quickies.alanstorm.com/post/6462298634/404-debugging

    摘录,

    将此代码放入函数_validateControllerClassName

    <?php
    #File: app/code/core/Mage/Core/Controller/Varien/Router/Standard.php
    
        /**
         * Generating and validating class file name,
         * class and if evrything ok do include if needed and return of class name
         *
         * @return mixed
         */
        protected function _validateControllerClassName($realModule, $controller)
        {
            $controllerFileName = $this->getControllerFileName($realModule, $controller);        
            if (!$this->validateControllerFileName($controllerFileName)) {
                var_dump($controllerFileName);
                return false;
            }
    
            $controllerClassName = $this->getControllerClassName($realModule, $controller);
            if (!$controllerClassName) {
                var_dump($controllerClassName);
                return false;
            }
    
            // include controller file if needed
            if (!$this->_includeControllerClass($controllerFileName, $controllerClassName)) {
                var_dump($controllerFileName . '----' . $controllerClassName);
                return false;
            }
    
            return $controllerClassName;
        }
    

    【讨论】:

    • 试过放这个功能还是一样
    • 此功能只是为了帮助您调查问题所在。它会解决任何问题...
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-09
    • 2011-01-28
    • 2012-03-30
    相关资源
    最近更新 更多