1

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 Oct 6 '15 at 14:17
0

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 Oct 6 '15 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 Oct 6 '15 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 Oct 6 '15 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 Oct 6 '15 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 Oct 7 '15 at 5:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.