0

I am Trying To create a Simple Module. It's Found 404 page Error.

My config file in app/etc/module/dixit_featured.xml

      <?xml version="1.0"?>
         <config>
          <modules>
             <dixit_featured>
                <active>true</active>
                <codepool>local</codepool>
              </dixit_featured>
          </modules>
         </config>

Create Controllrer in app\code\local\dixit\featured\controllers\IndexController.php

    <?php
      class dixit_featured_IndexController extends Mage_Core_Controller_Front_Action
       {
           public function indexAction ()
           {
            echo 'test index';
           }
           public function mamethodeAction ()
           {
            echo 'test mymethod';
            }
        }
     ?>

And Create My Plugin xml file in app\code\local\dixit\featured\etc\config.xml

       <?xml version="1.0"?>
         <config>
            <modules>
               <dixit_featured>
                  <version>1.0.1</version>
               </dixit_featured>
             </modules>
    <frontend>
        <routers>
             <mymodule>
                <use>standard</use>
                <args>
                    <module>dixit_featured</module>
                    <frontname>dixit</frontname>
                </args>
             <mymodule>
        </routers>
    </frontend>
  </config>

2 Answers 2

2

First thing you should do is write the names (namespace, module and class names) in correct case (camelcase)

app/etc/module/dixit_featured.xml should be app/etc/module/Dixit_Featured.xml

Inside this file and module's configuration file (etc/config.xml) you should also use the correct case for the namespace and module name

<modules>
  <Dixit_Featured>
    <active>true</active>
    <codepool>local</codepool>
  </Dixit_Featured>
</modules>

Your namespace and module folders should also be camelcase

app\code\local\dixit\featured should be changed to app\code\local\Dixit\Featured

And finally, use correct case in class names: class Dixit_Featured_IndexController extends Mage_Core_Controller_Front_Action

0

there are lot of issue in your Module>Please check

My config file in app/etc/module/dixit_featured.xml Path should be Dixit_Featured.xml from

dixit_featured.xml

and code

<?xml version="1.0"?>
 <config>
  <modules>
     <Dixit_Featured> <!--  Dixit_Featured from  dixit_featured -->
    <active>true</active>
    <codepool>local</codepool>
      </Dixit_Featured> <!--  Dixit_Featured from dixit_featured -->
  </modules>
 </config>

Created Controllrer in app\code\local\dixit\featured\controllers\IndexController.php Path should be app\code\local\Dixit\Featured\controllers\IndexController.php

<?php
class Dixit_Featured_IndexController extends Mage_Core_Controller_Front_Action
{
   public function indexAction ()
   {
    echo 'test index';
   }
   public function mamethodeAction ()
   {
    echo 'test mymethod';
    }
}
?>

Class Should be dixit_featured_IndexController from Dixit_Featured_IndexController

And Created My Plugin xml file in app\code\local\dixit\featured\etc\config.xml to change xml file in app\code\local\Dixit\Featured\etc\config.xml and look like

<?xml version="1.0"?>
 <config>
    <modules>
       <dixit_featured><!--  Dixit_Featured from dixit_featured -->
      <version>1.0.1</version>
       </dixit_featured> <!--  Dixit_Featured from dixit_featured -->
     </modules>
<frontend>
<routers>
     <mymodule>
    <use>standard</use>
    <args>
        <module>Dixit_Featured</module> <!--  Dixit_Featured to  dixit_featured -->
        <frontname>dixit</frontname>
    </args>
     <mymodule>
</routers>
</frontend>
</config>

Please study basic study of module

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.