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 ?

asked May 9, 2014 at 10:08
7
  • please give the code of the app/code/local/Attila2/ModulTest/config.xml need to check that file also if any errors presents Commented May 9, 2014 at 10:11
  • please check now the post Commented May 9, 2014 at 10:13
  • please check the spelling mistake of fronted Commented May 9, 2014 at 10:15
  • I get text "test" when I clicked your link? Commented 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 Commented 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

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

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.