2015-08-28 112 views
1

我剛剛從Here下載了Magento 1.9.2.1。Magento 1.9.2.1:我的自定義模塊出現404錯誤,適用於1.9.1版本

我按照This回答了所有步驟Alan storm

並點擊http://127.0.0.1/magentoNew/index.php/helloworld,這給出404雖然所有的文件,代碼是相同的(複製粘貼)。

另外我試着按Inchoo的This教程製作另一個自定義模塊,但我仍然得到404頁面(一個人有同樣的問題)。

我按照Alan Storm的回答了所有指示。而且它在magento 1.9.1上運行的非常好。*相當不錯,但是會給最新版本帶來問題,任何人都可以解決同樣的問題?

注意:所有文件在etc中都是一樣的,而local/MyCompanyName/HelloWorld文件夾按照教程。

我正在使用新的電腦,所以我不得不安裝所有新的設置Magento 1.9.2.1,所以我只是從筆記本電腦的運行那裏(筆記本電腦已安裝magento 1.9.1.0)複製相同的擴展文件。

enter image description here

謝謝。

編輯:正如我已經寫道,所有代碼,你可以在這裏看到How to create a simple 'Hello World' module in Magento?,我仍然寫一些文件。

​​3210

<?xml version="1.0"?> 
<config> 
    <modules> 
     <mycompanyname_helloworld> 
      <version> 
       0.1.0 
      </version> 
     </mycompanyname_helloworld> 
     <frontend> 
      <routers> 
       <!-- the <helloworld> tagname appears to be arbitrary, but by 
       convention is should match the frontName tag below--> 
       <helloworld> 
        <use>standard</use> 
        <args> 
         <module>MyCompanyName_HelloWorld</module> 
         <frontName>helloworld</frontName> 
        </args> 
       </helloworld> 
      </routers> 
     </frontend> 

    </modules> 
</config> 

:)緩存是明確

enter image description here

+0

您是否對前端和管理員使用相同的路由器? – Muk

+0

我爲前端創建了簡單模塊。 –

+0

在您的問題中添加config.xml代碼和控制器文件代碼。然後有人可以幫助您。 – Muk

回答

0

嘗試按照你的config.xml文件的代碼,並清除緩存,看看是否可行與否?

<?xml version="1.0"?> 
<config> 
    <modules> 
     <mycompanyname_helloworld> 
      <version> 
       0.1.0 
      </version> 
     </mycompanyname_helloworld> 
    </modules> <!-- Check this line --> 
     <frontend> 
      <routers> 
       <!-- the <helloworld> tagname appears to be arbitrary, but by 
       convention is should match the frontName tag below--> 
       <helloworld> 
        <use>standard</use> 
        <args> 
         <module>MyCompanyName_HelloWorld</module> 
         <frontName>helloworld</frontName> 
        </args> 
       </helloworld> 
      </routers> 
     </frontend>  
</config> 
+0

檢查編輯。即使在嘗試你的代碼之後(在標籤之外移動前端,它會說404,找不到! –

+0

@PratikCJoshi即使你的Magento緩存被禁用了,建議你刪除Magento根目錄下的var/cache文件夾。你的控制器代碼和你的模塊的目錄結構是什麼? – Muk