Magento 1 – Create Simple Controller Not Working in Module

controllersmagento-1module

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

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

<?xml version = "1.0"?>
   <config>
      <modules>
        <Ffay_Test>
            <active>true</active>
            <codePool>local</codePool>
         </Ffay_Test>
       </modules>
    </config>

Create Controllrer in app\code\local\Ffay\Test\controllers\IndexController.php

class Ffay_Test_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\Ffay\Test\etc\config.xml

   <?xml version="1.0"?>
  <config>
     <modules>
        <Ffay_Test>
          <version>1.0.0</version>
        </Ffay_Test>
     </modules>
     <frontend>       
        <routers>
            <routeurfrontend>
            <use>standard</use>
            <args>
                <module>Ffay_Test</module>
                <frontName>testing</frontName>
            </args>
            </routeurfrontend>
        </routers>    
    </frontend>
</config>

When I am Write testing in magento in display 404 page error. can You Tell me What's Issue?

Best Answer

I tested your code and it seams to work.
I only have 2 comments.
You say you created the file app/etc/module/Ffay_All.xml. I assume that's a typo and the correct folder is app/etc/modules/Ffay_All.xml (modules instead of module).
I aslo see some spaces in your config.xml file at the beginning before <?xml version="1.0"?>. remove them.
Also clear the cache.

It worked for me for url testing and testing/index/mamethode.

Related Topic