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

  • Home
  • SEARCH
  • 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 6138233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:49:32+00:00 2026-05-23T17:49:32+00:00

Removing the Class around the IndexAction causes a server error, so I know the

  • 0

Removing the Class around the IndexAction causes a server error, so I know the code is running as expected up to that point.

class Foo_Bar_IndexController extends Mage_Core_Controller_Front_Action{
    public function indexAction(){
        echo "<h1>Echo from indexcontroller.</h1>";
    }
}

Ideally the echo would be replaced by loading template files, but I’ve been stuck on it 404ing for the last 2 days and just want to get past that.

I’ve read through about a dozen tutorial, followed 4 to completetion, but this issue pops up every time.
Does anyone have an idea what could be causing this?

Edit–
Sorry, for the brevity. I wasn’t sure how much I should distend the page.

@ Alan Storm — I found your tutorial here. http://alanstorm.com/magento_controller_hello_world (Great Detail, very helpful in understanding what all the xml tags do). This is a copy of that tutorial with Foo replacing Alanstormdotcom and Bar replacing Helloworld. Even copy/pasting I end up with the same 404.

Here is my current config file:
PATH: app/code/local/Foo/Bar/etc/config.xml (edit: corrected path)

<config>
<modules>
    <Foo_Bar>
        <version>0.1.0</version>
    </Foo_Bar>
</modules>
<frontend>
    <routers>
        <bar>
            <use>standard</use>
            <args>
                <module>Foo_Bar</module>
                <frontName>bar</frontName>
            </args>
        </bar>
    </routers>  
</frontend>
</config>

Edit—
the last remaining file
Path: app/etc/modules/Foo_Bar.xml

<config>
<modules>
    <Foo_Bar>
        <active>true</active>
        <codePool>local</codePool>
    </Foo_Bar>
</modules>
</config>       
  • 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-05-23T17:49:32+00:00Added an answer on May 23, 2026 at 5:49 pm

    Your path is incorrect:

    app/etc/modules/Foo/Bar/etc/config.xml
    

    You should place your module’s definition file Foo_Bar.xml in app/etc/modules and the code of your module in app/code/local:

    app/code/local/Foo/Bar/etc/config.xml
    app/code/local/Foo/Bar/controllers/IndexController.php
    

    EDIT: in order to access your controller you should access this url:

    www.example.com/magento-instance/bar/index
    

    Following this pattern:

    {magento_root}/{magento_module}/{magento_controller}/{magento_action}

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

Sidebar

Related Questions

I have a problem removing breakpoints that are set when I attach to a
While altering a table (removing a column) in SQL Server 2008, I clicked the
I'm adding and removing <li> elements with jQuery, that are shown horizontally with the
I am using jQuery to show and hide a div by adding/removing a class
I have used this code in my AS3 document class to remove all objects
I'm working with some legacy test code which makes use of a TestSetup class
I have some .NET remoting code where a factory method, implemented in some server
A quick description of the environment: I have a class that represents a chatroom
I have a question about the following code: class MyClass : private boost::noncopyable {
I quite often write code that copies member variables to a local stack variable

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.