I am using Magento CE 1.9.2.1. I wrote a custom module for just outputting "Test page Feedback". But, I am unable to access the page (facing 404 error) http://localhost/magento/index.php/feedback/index or http://localhost/magento/feedback/index. Even, I am unable to find any error in the logs.
Below is my code for the respective files:
/app/etc/modules/MYStore_Feedback.xml
<?xml version="1.0"?>
<config>
<modules>
<MYStore_Feedback>
<active>true</active>
<codePool>local</codePool>
<version>0.1.0</version>
</MYStore_Feedback>
</modules>
</config>
app/code/local/MYStore/Feedback/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<MYStore_Feedback>
<version>0.1.0</version>
</MYStore_Feedback>
</modules>
<frontend>
<routers>
<feedback>
<use>standard</use>
<args>
<module>MYStore_Feedback</module>
<frontName>feedback</frontName>
</args>
</feedback>
</routers>
</frontend>
</config>
app/code/local/MYStore/Feedback/controllers/IndexController.php
<?php
class MYStore_Feedback_IndexController extends Mage_Core_Controller_Front_Action {
public function indexAction() {
echo "Test page Feedback";
}
}
-
Did you disable the cache or at lease refresh it?Milan Simek– Milan Simek2015年10月06日 14:17:20 +00:00Commented Oct 6, 2015 at 14:17
1 Answer 1
It should be frontName (with uppercase N) and not frontname lowercase in your config.xml file.
-
Sorry.. Its not working even after I changed the frontname to frontName.Kiran Tej– Kiran Tej2015年10月06日 14:09:46 +00:00Commented Oct 6, 2015 at 14:09
-
I created the module on a fresh Magento on my side and it works perfectly fine. Please try flushing your cache, removing var/cache folders and try again.Raphael at Digital Pianism– Raphael at Digital Pianism2015年10月06日 14:15:16 +00:00Commented Oct 6, 2015 at 14:15
-
Wow someone is on a downvoting spree. Strange because this answer is correct, you should use frontName, not frontname. You have my upvote.Milan Simek– Milan Simek2015年10月06日 15:24:19 +00:00Commented Oct 6, 2015 at 15:24
-
Thanks Milan, I'm sure it is the right answer as I personally tested it on my side but anyway ^^Raphael at Digital Pianism– Raphael at Digital Pianism2015年10月06日 15:26:03 +00:00Commented Oct 6, 2015 at 15:26
-
I disabled the cache and deleted the var/cache folder. But, its same. Its redirecting to 404 error. Should I make any other changes such as folder permissions etc? I am using WAMP Server.Kiran Tej– Kiran Tej2015年10月07日 05:29:25 +00:00Commented Oct 7, 2015 at 5:29