久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

管理頁面上的 Magento 404

Magento 404 on Admin Page(管理頁面上的 Magento 404)
本文介紹了管理頁面上的 Magento 404的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

大約一周前,我在一個新網站的測試環境中工作.我離開了一個小時,回來了,現在無法進入管理頁面,如'http://magento.localhost.com/admin' 導致沒有 404 路由.我是唯一可以訪問它的人,它在任何意義上都不是實時的.我在 Ubuntu 中使用 VBox 來托管環境.在可能的修復方面,到目前為止我已經嘗試過......

About a week ago, I was working in a test environment for a new site. I left for an hour, came back, and now cannot get to the admin page, as in ‘http://magento.localhost.com/admin’ results in a No Route 404. I am the only one with access to this, it is not live in any sense. I am using VBox with Ubuntu to host the environment. In terms of possible fixes, so far I have tried…

  • 確保 core_store、core_store_group、core_website 和 customer_group 表 ID 設置為 0(如本文和許多其他文章中所述 - http://www.nude-webdesign.com/fix-for-magento-admin-error-404-page-未找到/)

使用/app/code/core/Mage/Core/Controller/Varien/Front.php 方法 _isAdminFrontNameMatched 來顯示 adminPath(它是‘admin’)

Playing with the /app/code/core/Mage/Core/Controller/Varien/Front.php method _isAdminFrontNameMatched to display the adminPath (it’s ‘admin’)

清除var文件夾,清空瀏覽器緩存.網站的緩存過去和現在都已關閉.

Cleared the var folder, emptied browser cache. Site’s caching was and is turned off.

將index.php"添加到 url 仍然會導致 404.

Adding 'index.php' to the url still results in a 404.

根據 Magento Admin 404,文件app/etc"/use_cache.ser' 對我來說不存在.

As per Magento Admin 404, the file 'app/etc/use_cache.ser' doesn't exist for me.

在發生這種情況的那天,我只是在玩一些我復制到我制作的模塊中的布局文件和主題的媒體查詢(所有這些都在這個問題開始發生之前恢復到它們的原始狀態).

On the day of this occurring, I was simply playing around with some layout files I had copied to a module I made and the theme’s media queries (all of which were reverted to their original state even before this problem started to occur).

有人對這里出了什么問題有什么建議嗎?這可能發生的任何其他可能的原因?

Does anyone have any suggestions as to what is wrong here? Any other possible reasons this could be happening?

謝謝你的一切.

EDIT 1:06pm 9/10/2013: 為了響應 Alan Storm 的檢索 Standard.php 正在尋找的控制器名稱的方法,我收到了許多丟失"的控制器文件.但是,在下載 1.7.0.2 的新副本以找到這些文件后,它們也不存在于其中.這是我在 Standard.php 中 Alan 的 var_dump 建議的輸出:

EDIT 1:06pm 9/10/2013: In response to Alan Storm's method of retrieving controller names that Standard.php is looking for, I was returned many "missing" controller files. However, after downloading a fresh copy of 1.7.0.2 to find those files, they weren't present in their either. Here is my output from Alan's var_dump suggestion in Standard.php:

  • ..."/public_html/app/code/core/Mage/Index/controllers/Adminhtml/Controller.php"

  • ..."/public_html/app/code/core/Mage/Index/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Paygate/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Paygate/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Paypal/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Paypal/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Widget/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Widget/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Oauth/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Oauth/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Authorizenet/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Authorizenet/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Bundle/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Bundle/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Centinel/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Centinel/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Compiler/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Compiler/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Connect/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Connect/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Downloadable/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Downloadable/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/ImportExport/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/ImportExport/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Api2/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Api2/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/PageCache/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/PageCache/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/XmlConnect/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/XmlConnect/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Adminhtml/controllers/Controller.php"

..."/public_html/app/code/core/Mage/Adminhtml/controllers/Controller.php"

..."/public_html/app/code/community/Phoenix/Moneybookers/controllers/Controller.php"

..."/public_html/app/code/community/Phoenix/Moneybookers/controllers/Controller.php"

..."/public_html/app/code/core/Mage/Captcha/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/Captcha/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/CurrencySymbol/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/CurrencySymbol/controllers/Adminhtml/Controller.php"

..."/public_html/app/code/core/Mage/CurrencySymbol/controllers/Adminhtml/IndexController.php"

..."/public_html/app/code/core/Mage/CurrencySymbol/controllers/Adminhtml/IndexController.php"

已于 2013 年 9 月 10 日下午 3:39 解決: 好的,它已修復,盡管很直白.我認為 Alan Storm 的 var_dump 建議的輸出意味著我在核心代碼池中的某處創建了一個錯誤(這不是我打算做的事情,與默認代碼搞砸了).不幸的是,為了精確學習,我隨后將其全部替換為 1.7.0.2 的默認核心代碼池.這是在艾倫用我從未調查過的更多建議更新他的原始答案之前完成的.謝謝艾倫,你太棒了.

Resolved 3:39pm 9/10/2013: Ok, it's fixed albeit rather bluntly. I took the output of Alan Storm's var_dump suggestion to mean I had created an error somewhere in the core code pool (which is not something I intended on doing, screwing with the default code that is). Unfortunately for sake of exact learning, I then replaced it all with the default core code pool of 1.7.0.2. This was done before Alan updated his original answer with more suggestions that I never investigated. Thanks Alan, you're rad.

推薦答案

無路由 404 錯誤通常表示 Magento 找不到它認為應該加載的控制器文件(通常是由于配置錯誤)

A no route 404 error usually indicates Magento can't find the controller file it thinks it should load (usually due to a misconfiguration)

最簡單的診斷方法是跳轉到 _validateControllerClassName

The easiest way to diagnose this is to hop to _validateControllerClassName

#File: app/code/core/Mage/Core/Controller/Varien/Router/Standard.php
protected function _validateControllerClassName($realModule, $controller)
{
    $controllerFileName = $this->getControllerFileName($realModule, $controller);

    if (!$this->validateControllerFileName($controllerFileName)) {  
        return false;
    }

    $controllerClassName = $this->getControllerClassName($realModule, $controller);
    if (!$controllerClassName) {
        return false;
    }

    // include controller file if needed
    if (!$this->_includeControllerClass($controllerFileName, $controllerClassName)) {
        return false;
    }

    return $controllerClassName;
}

并在返回的 false 語句周圍刪除一些日志記錄或 var_dump.這應該會告訴您 Magento 正在尋找哪些文件但找不到哪些文件 - 通常足以指出問題所在.

and drop some logging or var_dumps around the return false statments. This should tell you which files Magento is looking for and can't find — it's usually enough to point to the problem.

    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("Couldn't include: $controllerFileName");
        return false;
    }

更新:Magento 在多個位置查找控制器文件是正常的——每個注冊為包含 adminhtml 控制器文件的模塊都需要檢查.

Update: It's normal for Magento look for the controller file in multiple places —?every module that registered as containing adminhtml controller files needs to be checked.

然而,幾乎所有要查找的控制器文件都被命名為/Controller.php.對于默認的 /admin 索引頁面,它應該是 IndexController.php.這讓我覺得你的系統認為它應該尋找一個空名稱的控制器,(可能是默認的控制器值,因為 /admin(而不是 admin/index)是您正在使用的網址)

However, almost all the controller files being looked for are named /Controller.php. For the default /admin index page this should be IndexController.php. This makes me think your system thinks it's supposed to look for a controller with a blank name, (likely the default controller value since /admin (and not admin/index) is the URL you're using)

發生這種情況的原因有很多 - 許多原因都圍繞著核心文件被更改或模塊中的配置節點設置為錯誤的值.如果下面的解決方案對您不起作用,您需要嘗試將代碼庫與干凈的代碼庫進行比較,禁用每個自定義模塊,如果修復后重新打開模塊,直到找到問題模塊,或者潛水深入調試 Magento 路由代碼,找出系統不滿意的原因.

There's myriad reasons this could happen —?many revolving around a core file being changed or a configuration node in a module set to the wrong value. If the solutions below don't work for you you'll need to try diff-ing your code base vs. a clean one, disabling every custom module and if that fixing things turn modules back on until the problem module is found, or dive deep into debugging Magento routing code to figure out why your system is unhappy.

此行為的一個常見原因是為自定義管理路徑設置的值無效(或根本沒有值)

One common cause for this behavior is an invalid value (or no value at all) being set for a custom admin path at

System -> Configuration -> Admin -> Admin Base URL -> Use Custom Admin Path

如果自定義管理路徑"的值為空,或者包含額外的 /,這可能會干擾路由.

If the value for "custom admin path" is blank, or contains and additional /, this could be interfering with the routing.

由于您無法訪問管理員,請嘗試運行以下 SQL 查詢

Since you can't access the admin, try running the following SQL query

select * from core_config_data where path like '%custom_path%';    
...
292 default 0   admin/url/use_custom_path   1
293 default 0   admin/url/custom_path   admin/

如果您看到與上述類似的結果,或者 admin/url/custom_path 為空/不存在但 admin/url/use_custom_path 仍然是 1——那是你的問題.

If you see results similar to the above, or admin/url/custom_path is blank/not-present but admin/url/use_custom_path is still 1 — then that's your problem.

嘗試從 core_config_data 中刪除這些配置值 (admin/url/use_custom_path) 和 (admin/url/use_custom_path).

Try deleting these configuration values (admin/url/use_custom_path) and (admin/url/use_custom_path) from core_config_data.

如果這不適用于您的系統,根據我的空白控制器理論,我最好的猜測是出于某種未知原因

If that doesn't apply to your system, per my blank controller theroy my best guess would be for some unknown reason the code at

#File: app/code/core/Mage/Core/Controller/Varien/Router/Admin.php
public function fetchDefault()
{
    // set defaults
    $d = explode('/', $this->_getDefaultPath());
    $this->getFront()->setDefault(array(
        'module'     => !empty($d[0]) ? $d[0] : '',
        'controller' => !empty($d[1]) ? $d[1] : 'index',
        'action'     => !empty($d[2]) ? $d[2] : 'index'
    ));
}

正在用空白值填充 controller 鍵.

is populating the controller key with a blank value.

這篇關于管理頁面上的 Magento 404的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Override Magento Config(覆蓋 Magento 配置)
What would cause a print_r and/or a var_dump to fail debugging a variable?(什么會導致 print_r 和/或 var_dump 調試變量失敗?)
How to update custom options programatically in magento?(如何在 magento 中以編程方式更新自定義選項?)
Magento - get price rules from order(Magento - 從訂單中獲取價格規則)
Magento Change Product Page Titles to Include Attributes(Magento 更改產品頁面標題以包含屬性)
Magento: adding duties/taxes to a quote during review(Magento:在審查期間向報價添加關稅/稅款)
主站蜘蛛池模板: 国产小视频精品 | 久草综合在线 | 毛片一区二区三区 | 欧美aⅴ片 | 美女福利视频一区 | 一区二区三区四区在线 | 丝袜一区二区三区 | 免费亚洲网站 | 国产一区二 | 狠狠久久综合 | 日韩av一区二区在线观看 | 一级黄a| 国产视频第一页 | 久久精品欧美电影 | 一级黄色影片在线观看 | 国产一区二区在线免费视频 | 犬夜叉在线观看 | 99精品视频在线观看 | 成人av片在线观看 | 伊人久久国产 | 欧美一级片在线看 | 91久久综合亚洲鲁鲁五月天 | 人人做人人澡人人爽欧美 | 国产无套一区二区三区久久 | 在线免费观看毛片 | 欧美色综合网 | 午夜一区 | 欧美日韩在线精品 | 久久精品久久精品久久精品 | 欧美精品a∨在线观看不卡 欧美日韩中文字幕在线播放 | 成人日韩 | 激情亚洲 | 色综合一区二区 | 视频在线一区二区 | 亚洲av毛片 | 国产丝袜一区二区三区免费视频 | 成人免费在线观看视频 | 一级毛片播放 | 超碰91在线 | 91社区在线观看播放 | 国产一区二区精华 |