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 ?

  • please give the code of the app/code/local/Attila2/ModulTest/config.xml need to check that file also if any errors presents – Pradeep Sanku May 9 '14 at 10:11
  • please check now the post – Attila Naghi May 9 '14 at 10:13
  • please check the spelling mistake of fronted – Pradeep Sanku May 9 '14 at 10:15
  • I get text "test" when I clicked your link? – Mr_Green May 9 '14 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 – Pradeep Sanku May 9 '14 at 10:22
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

  • I changed into "frontend", but nothing happened, still 404 – Attila Naghi May 9 '14 at 10:19
  • now i had changed frontname please check modultest – Pradeep Sanku May 9 '14 at 10:20
  • yeah it works, but why must i have to change it into lowercase letters? – Attila Naghi May 9 '14 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 – Pradeep Sanku May 9 '14 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>
  • I followed the example from this link : insync.co.in/creating-custom-module-magento – Attila Naghi May 9 '14 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 '14 at 10:18
  • I copy pasted your code and i get still the 404 – Attila Naghi May 9 '14 at 10:18
  • have you added <?xml version="1.0"?> in config.xml? – Dexter May 9 '14 at 10:22

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.