0

I'm trying to follow this tutorial:

http://devdocs.magento.com/guides/m1x/magefordev/mage-for-dev-5.html

I am using Magento 1.9.x (not 2)

I'm stuck at creating a weblog module, the module is enabled but the path isn't working in my browser.

IndexController.php in `code/local/Magentotutorial/Weblog/controllers/IndexController.php

<?php
class Magentotutorial_Weblog_IndexController extends 
 Mage_Core_Controller_Front_Action {
 public function testModelAction() {
 echo 'Setup!';
 }
 }

Magentotutorial_Weblog.xml in app/etc/modules/Magentotutorial_Weblog.xml

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

config.xml in app/code/local/Magentotutorial/Weblog/etc/config.xml

<frontend>
<routers>
 <weblog>
 <use>standard</use>
 <args>
 <module>Magentotutorial_Weblog</module>
 <frontName>weblog</frontName>
 </args>
 </weblog>
</routers>
</frontend>

I try to load the page http://localhost/MagentoTut/weblog/index/testModel, but it comes up with 404 Not Found. Am I missing something that I need to create a module? It says the module is enabled in my admin panel so maybe the routing is not right?

Muhammad Anas
1,4673 gold badges13 silver badges33 bronze badges
asked Aug 25, 2017 at 4:38

1 Answer 1

0

It was with my config.xml file, I've modified it to look like this:

<config> 
<modules>
 <Magentotutorial_Weblog>
 <version>0.1.0</version>
 </Magentotutorial_Weblog>
</modules>
<frontend>
 <routers>
 <weblog>
 <use>standard</use>
 <args>
 <module>Magentotutorial_Weblog</module>
 <frontName>weblog</frontName>
 </args>
 </weblog>
 </routers> 
</frontend>
</config>
Teja Bhagavan Kollepara
3,8275 gold badges33 silver badges69 bronze badges
answered Aug 25, 2017 at 4:46

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.