0

I've created simple module with couple controllers. Tested on local machine - everything works fine. But when i am trying move my module to live server - my module doen't works.(I get 404 everytime i am trying to get frontednMapping/controller/action). Module structure is

/app/code/local/Amo/module/etc/config.xml

    <?xml version="1.0" encoding="utf-8"?>
<config>
    <modules>
        <Amo_module>
            <version>0.1.0</version>
        </Amo_module>
    </modules>
    <!-- This node contains parameters, available on frontend -->
    <frontend>
        <!-- Module aliases are located in this block -->
        <routers>
            <!-- This node's name should be the same as our alias -->
            <module>
                <!-- use parameter specifies which of basic routers needs to be used.
                This can be "standard" for frontend or "admin" for backend -->
                <use>standard</use>
                <!-- router arguments block -->
                <args>
                    <!-- This parameter specifies the full name of out module -->
                    <module>Amo_module</module>
                    <!-- This parameter sets module alias -->
                    <frontName>adtfnc</frontName>
                </args>
            </module>
        </routers>
        <layout>
            <updates>
                <helloworld>
                    <file>amomodule.xml</file>
                </helloworld>
            </updates>
        </layout>
    </frontend>
</config>

/app/code/local/Amo/module/controllers/IndexController.php

<?php
class Amo_module_IndexController extends Mage_Core_Controller_Front_Action {

    public function indexAction() {
        echo "test data is OK";
    }

   }

/app/etc/modules/Amo_module.xml

<?xml version="1.0" encoding="utf-8"?>
<config>
    <modules>
        <Amo_module>
            <active>true</active>
            <codePool>local</codePool>
        </Amo_module>
    </modules>
</config>

On dev machine i get such info for my module:

var_dump(Mage::getConfig()->getModuleConfig('Amo_module'));
echo Mage::getUrl('module/index/index');

object(Mage_Core_Model_Config_Element)[551]
  public 'active' => string 'true' (length=4)
  public 'codePool' => string 'local' (length=5)
  public 'version' => string '0.1.0' (length=5)
http://magento.local/adtfnc/index/index/

same info on live

object(Mage_Core_Model_Config_Element)#853 (2) { 
["active"]=> string(4) "true" 
["codePool"]=> string(5) "local" } 
http://live.server/module/index/index/

As we can there is no module version and magento(as i understand) can see frontend mapping for my module. Error.log is empty. Apache config same for dev and live machine.

  • Feel free to accept any one of the answer. Please dont leave your question as it is. – Rajeev K Tomy Sep 24 '14 at 3:19
1

The module name should start with a capital letter. So instead of Amo_module name it Amo_Module.

  • hmm.. I was sure you will answer this question first. Because @marius is awake and active :) – Rajeev K Tomy Jul 24 '14 at 8:11
  • @programmer_rkt. Damn...silly news travels fast. :) – Marius Jul 24 '14 at 8:12
  • I was the one who talked you in twitter before you "AWAKE" :) -rajKtomy – Rajeev K Tomy Jul 24 '14 at 8:16
  • Thanks a lot guys. Everything works fine. Sorry for silly questions. – Yura Jul 24 '14 at 8:20
  • Happy to hear. Every one does make mistakes. Accept One of our answer. – Rajeev K Tomy Jul 24 '14 at 8:24
1

Your module name's first letter should be Capital letter.

That is your location should be in app/code/local/Amo/Module

Your etc/modules xml file should look like this

<?xml version="1.0" encoding="utf-8"?>
<config>
    <modules>
        <Amo_Module>
            <active>true</active>
            <codePool>local</codePool>
        </Amo_module>
    </modules>
</config>

Your controller should look like Amo_Module_IndexContorller.

You need to change your module definition as Amo_Module in everywhere

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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