Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8198187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:53:55+00:00 2026-06-07T05:53:55+00:00

I am following the Magento for developers tutorial on the Magento Knowledge Base and

  • 0

I am following the Magento for developers tutorial on the Magento Knowledge Base and after I reached part 4 (see the link), I’ve ran into a problem. I’ve done the changes specified in this part of the tutorial, and after that, with the “/helloworld/index/index” controller, the browser displays a completely empty output. The previously populated “goodbye” and “params” controllers seem fine as does the “showConfig” XML output.

Can anyone shed any light about it? Here are the differences to my previous checkpoint at the end of part 3:

diff -r 98d31339093e -r fd26e7cbf555 magento/magento/app/code/local/Magentotutorial/Configviewer/Model/Observer.php
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/magento/magento/app/code/local/Magentotutorial/Configviewer/Model/Observer.php    Thu Jul 05 09:02:36 2012 +0000
@@ -0,0 +1,32 @@
+<?php
+    class Magentotutorial_Configviewer_Model_Observer {
+        const FLAG_SHOW_CONFIG = 'showConfig';
+        const FLAG_SHOW_CONFIG_FORMAT = 'showConfigFormat';
+
+        private $request;
+
+        public function checkForConfigRequest($observer) {
+            $this->request = $observer->getEvent()->getData('front')->getRequest();
+            if($this->request->{self::FLAG_SHOW_CONFIG} === 'true'){
+                $this->setHeader();
+                $this->outputConfig();
+            }
+        }
+
+        private function setHeader() {
+            $format = isset($this->request->{self::FLAG_SHOW_CONFIG_FORMAT}) ?
+            $this->request->{self::FLAG_SHOW_CONFIG_FORMAT} : 'xml';
+            switch($format){
+                case 'text':
+                    header("Content-Type: text/plain");
+                    break;
+                default:
+                    header("Content-Type: text/xml");
+            }
+        }
+
+        private function outputConfig() {
+            die(Mage::app()->getConfig()->getNode()->asXML());
+        }
+    }
+?>
diff -r 98d31339093e -r fd26e7cbf555 magento/magento/app/code/local/Magentotutorial/Configviewer/etc/config.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/magento/magento/app/code/local/Magentotutorial/Configviewer/etc/config.xml    Thu Jul 05 09:02:36 2012 +0000
@@ -0,0 +1,20 @@
+<config>
+    <modules>
+        <Magentotutorial_Configviewer>
+            <version>0.1.0</version>
+        </Magentotutorial_Configviewer>
+    </modules>
+    <global>
+        <events>
+            <controller_front_init_routers>
+                <observers>
+                    <Magentotutorial_configviewer_model_observer>
+                        <type>singleton</type>
+                        <class>Magentotutorial_Configviewer_Model_Observer</class>
+                        <method>checkForConfigRequest</method>
+                    </Magentotutorial_configviewer_model_observer>
+                </observers>
+            </controller_front_init_routers>
+        </events>
+    </global>
+</config>
diff -r 98d31339093e -r fd26e7cbf555 magento/magento/app/code/local/Magentotutorial/Helloworld/controllers/IndexController.php
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/magento/magento/app/code/local/Magentotutorial/Helloworld/controllers/IndexController.php Thu Jul 05 09:02:36 2012 +0000
@@ -0,0 +1,23 @@
+<?php
+class Magentotutorial_Helloworld_IndexController extends Mage_Core_Controller_Front_Action {
+
+    public function indexAction() {
+
+        echo 'Hello Index!';
+
+    }
+
+    public function goodbyeAction() {
+            echo 'Goodbye World!';
+    }
+
+    public function paramsAction() {
+        echo '<dl>';
+        foreach($this->getRequest()->getParams() as $key=>$value) {
+            echo '<dt><strong>Param: </strong>'.htmlspecialchars($key).'</dt>';
+            echo '<dt><strong>Value: </strong>'.htmlspecialchars($value).'</dt>';
+        }
+        echo '</dl>';
+    }
+}
+?>
diff -r 98d31339093e -r fd26e7cbf555 magento/magento/app/code/local/Magentotutorial/Helloworld/etc/config.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/magento/magento/app/code/local/Magentotutorial/Helloworld/etc/config.xml  Thu Jul 05 09:02:36 2012 +0000
@@ -0,0 +1,18 @@
+<config>
+    <modules>
+        <Magentotutorial_Helloworld>
+            <version>0.1.0</version>
+        </Magentotutorial_Helloworld>
+    </modules>
+    <frontend>
+        <routers>
+            <helloworld>
+                <use>standard</use>
+                <args>
+                    <module>Magentotutorial_Helloworld</module>
+                    <frontName>helloworld</frontName>
+                </args>
+            </helloworld>
+        </routers>
+    </frontend>
+</config>
diff -r 98d31339093e -r fd26e7cbf555 magento/magento/app/etc/modules/Magentotutorial_Configviewer.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/magento/magento/app/etc/modules/Magentotutorial_Configviewer.xml  Thu Jul 05 09:02:36 2012 +0000
@@ -0,0 +1,8 @@
+<config>
+    <modules>
+        <Magentotutorial_Configviewer>
+            <active>true</active>
+            <codePool>local</codePool>
+        </Magentotutorial_Configviewer>
+    </modules>
+</config>
diff -r 98d31339093e -r fd26e7cbf555 magento/magento/app/etc/modules/Magentotutorial_Helloworld.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/magento/magento/app/etc/modules/Magentotutorial_Helloworld.xml    Thu Jul 05 09:02:36 2012 +0000
@@ -0,0 +1,8 @@
+<config>
+    <modules>
+        <Magentotutorial_Helloworld>
+            <active>true</active>
+            <codePool>local</codePool>
+        </Magentotutorial_Helloworld>
+    </modules>
+</config>

And here are the new differences that cause the problem:

diff -r fd26e7cbf555 magento/magento/app/code/local/Magentotutorial/Helloworld/controllers/IndexController.php
--- a/magento/magento/app/code/local/Magentotutorial/Helloworld/controllers/IndexController.php Thu Jul 05 09:02:36 2012 +0000
+++ b/magento/magento/app/code/local/Magentotutorial/Helloworld/controllers/IndexController.php Thu Jul 05 12:13:55 2012 +0000
@@ -3,7 +3,10 @@

     public function indexAction() {

-        echo 'Hello Index!';
+        // remove our previous echo
+        // echo 'Hello Index!';
+        $this->loadLayout();
+        $this->renderLayout();

     }

diff -r fd26e7cbf555 magento/magento/app/code/local/Magentotutorial/Helloworld/simple_page.phtml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/magento/magento/app/code/local/Magentotutorial/Helloworld/simple_page.phtml   Thu Jul 05 12:13:55 2012 +0000
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+    <title>Untitled</title>
+    <meta name="generator" content="BBEdit 9.2" />
+    <style type="text/css">
+        body {
+            background-color:#f00;
+        }
+    </style>
+</head>
+<body>
+
+</body>
+</html>
diff -r fd26e7cbf555 magento/magento/app/design/frontend/base/default/layout/local.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/magento/magento/app/design/frontend/base/default/layout/local.xml Thu Jul 05 12:13:55 2012 +0000
@@ -0,0 +1,7 @@
+<layout version="0.1.0">
+    <default>
+        <reference name="root">
+            <block type="page/html" name="root" output="toHtml" template="../../../../../code/local/Magentotutorial/Helloworld/simple_page.phtml" />
+        </reference>
+    </default>
+</layout>

Thanks in advance,

— Shlomi Fish

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:53:57+00:00Added an answer on June 7, 2026 at 5:53 am
    <layout version="0.1.0">
        <default>
            <reference name="root">
                <block type="page/html" name="root" output="toHtml" template="../../../../../code/local/Magentotutorial/Helloworld/simple_page.phtml" />
            </reference>
        </default>
    </layout>
    

    Change to:

     <layout version="0.1.0">
        <default>
            <reference name="root">
                <block type="page/html" name="root" output="toHtml" template="magentotutorial/helloworld/simple_page.phtml" />
            </reference>
        </default>
    </layout>
    

    Then move your simple_page.phtml to:
    app/design/frontend/default/default/template/magentotutorial/helloworld/simple_page.phtml

    That should fix everything, I’m not convinced the way you are references your template location was correct. It’s always best to stick to convention.

    Hope that helps. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm following the tutorial on: http://www.magentocommerce.com/knowledge-base/entry/magento-for-dev-part-3-magento-controller-dispatch I'm creating a module called Rss in package
I am following this tutorial http://www.magentocommerce.com/knowledge-base/entry/magento-for-dev-part-5-magento-models-and-orm-basics . As per this tutorial,when i pass a
I am following Magento development tutorial Magento for Developers: Part 5 - Magento Models
I have configured multi site in my magento website. I follow the following link
I do have my own Controller in Magento, that has been done by following
In the Magento default theme's cart page we see the following totals box towards
Is there a way to run the following script via PHP http://www.magentoadvisor.com/magento-backup/tutorial-magento-backup-scripts-part-2/ I have
I am following this tutorial, trying to learn to make Magento extensions, however, in
I was following through on Alan Storm's tutorial on Magento's Model and ORM basics
After stumbling upon the following class while looking at magento source code: Mage_Core_Block_Template_Facade, i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.