3
votes

Good morning! I'm trying to create a Magento module, but the route I've defined in the module's config.xml leads to a 404 page.

I know this issue has popped up countless times, and I've spent the entire night reading through every SO response I could find on the subject.

Here's what I've done:

  1. Cleared the var/cache & var/session folder
  2. Ran compiler.php -- clear, compiler.php -- disable, and compiler.php -- compile
  3. Cleared & flushed the caches and cache storage in the admin panel, reindexed from the backend and from the command line
  4. Created a new package/module for testing, completely different from the one that I was using before. It's showing up in System>>Configuration>>Advanced.
  5. Verified that Magento is not appending a store code to the URL
  6. Simplified my code all the way down to a single echo statement in the indexAction() function of IndexController.php in my controllers folder.
  7. Tried navigating to mydomain.com/customroute and mydomain.com/index.php/customroute and mydomain.com/customroute/index/index, and mydomain.com/index.php/index, and all possible variations thereof.
  8. Repeated steps 1-8 multiple times. xD

Below are a few screenshots for reference. Thank you in advance - if anyone has any ideas how to move past this, that'd be a total life-saver. Thanks!!

EDIT:

Here is the code in app/etc/modules/Wolverine_Taurine.xml:

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

Wolverine/Taurine/etc/config.xml:

<?xml version="1.0"?>
 <config>
    <modules>
        <Wolverine_Taurine>
            <version>1.0</version>
        </Wolverine_Taurine>
    </modules>
    <frontend>
        <routers>
            <wolverine_taurine>
                <use>standard</use>
                <args>
                    <module>Wolverine_Taurine</module>
                    <frontName>taurine</frontName>
                </args>
            </wolverine_taurine>
        </routers>
    </frontend>
 </config>

Wolverine/Taurine/controllers/IndexController.php:

<?php
class Wolverine_Taurine_IndexController extends Mage_Core_Controller_Front_Action
{
    public function indexAction()
    {
        echo "I look incredible.";
    }
}
2
Share your app/etc/modules/Wolverine_Taurine.xml filemonojit
I have used your module and it perfectly works for me.monojit
r u working on linux platform?monojit
That's really weird! Yes, I am.Anthony Xiques
give proper permission of your files and folders.it's very important.monojit

2 Answers

3
votes

I have used your module and it perfectly works for me. If you are using linux platform then give proper permission of all files and folders. I think this is occurring due to file/folder permission.Change the Linux permissions for all files in your Magento base directory to readable and writable by the owning user (you).Set permissions to 664 for files and 775 for folders. 775 for files will work too. Set 777 for media and var , only 2 folders need to be writable by everyone.

2
votes

I had same issue, but solution was different. In my case it was config "issue" - previous developer set <disable_local_modules>true</disable_local_modules> in app/etc/local.xml and hardcoded frontend part of Excellence_Ajax in app\design\frontend\default\theme392\template\catalog\product\view.phtml instead of using module's templates (or had local modules disabled too so it wasn't working properly). Finally, it was requesting with ajax (hardcoded javascript) but wasn't routed because of disabled module.

I was debugging it as described here. I read logs and saw ajax module wasn't found in both admin and standard routers, so I digged deeper to find if module's config is loaded. I have added one more Mage::log() in app\code\core\Mage\Core\Model\Config.php in loadModulesConfiguration(), which I found after searching 'config.xml' in project, and checked $disableLocalModules's value. Voila.. So simple yet so hard ;)