0

hi this is my xml file from app/etc/modules/Attila2_ModulTest.xml :

<config>
    <modules>
        <Attila2_ModulTest>
            <active>true</active>
            <codePool>local</codePool>
        </Attila2_ModulTest>
    </modules>
</config>  

this is the config.xml from app/code/local/Attila2/ModulTest/etc/config.xml

      <?xml version="1.0"?>
<config>
    <modules>
        <Attila2_ModulTest>
            <version>0.1.0</version>
        </Attila2_ModulTest>
    </modules>
    <frontend>
        <routers>
            <modultest>
                <use>standard</use>
                <args>
                    <module>Attila2_ModulTest</module>
                    <frontName>ModulTest</frontName>
                </args>
            </modultest>
        </routers>
    </frontend>
</config>  

and this is the IndexController.php code from app/code/local/Attila2/ModulTest/controllers/IndexController.php

<?php
class Attila2_ModulTest_IndexController extends Mage_Core_Controller_Front_Action{
    public function indexAction(){
        echo "test";
    }
}

I cleared the caches. When i access the http://attin.netlogiq.info/magento/index.php/modultest , I get the 404 errors instead of my string "test". why ?

7
  • please give the code of the app/code/local/Attila2/ModulTest/config.xml need to check that file also if any errors presents May 9, 2014 at 10:11
  • please check now the post May 9, 2014 at 10:13
  • please check the spelling mistake of fronted May 9, 2014 at 10:15
  • I get text "test" when I clicked your link?
    – Mr_Green
    May 9, 2014 at 10:21
  • if still not worked please check the spaces.for eg their should be no space from the strat of <?xml tag etc May 9, 2014 at 10:22

2 Answers 2

2
<frontend>
        <routers>
            <modultest>
                <use>standard</use>
                <args>
                    <module>Attila2_ModulTest</module>
                    <frontName>modultest</frontName>
                </args>
            </modultest>
        </routers>
    </frontend>

please check their is a spelling mistake of frontend

4
  • I changed into "frontend", but nothing happened, still 404 May 9, 2014 at 10:19
  • now i had changed frontname please check modultest May 9, 2014 at 10:20
  • yeah it works, but why must i have to change it into lowercase letters? May 9, 2014 at 10:21
  • the name whatever you specifie in the <frontName> tag will be used in the url.so you specified name in caps and using small letters in the url May 9, 2014 at 10:23
0

Please add <frontend> instead of <fronted>

It should be something like this

<frontend>
        <routers>
            <routeurfrontend>
                <use>standard</use>
                <args>
                    <module>Attila2_ModulTest</module>
                    <frontName>ModulTest</frontName>
                </args>
            </routeurfrontend>
        </routers>
</frontend>
4
  • I followed the example from this link : insync.co.in/creating-custom-module-magento May 9, 2014 at 10:16
  • Follow above given code and you will get it.. rest seems fine.. also recheck the link.. you made a typo.. it should be frontend not fronted... :)
    – Dexter
    May 9, 2014 at 10:18
  • I copy pasted your code and i get still the 404 May 9, 2014 at 10:18
  • have you added <?xml version="1.0"?> in config.xml?
    – Dexter
    May 9, 2014 at 10:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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