nmeuleman
nmeuleman

Reputation: 284

Magento does not recognize new module

i tried like all tutorials out there and i still cannot get a custom created module to work in Magento.

This is the path where i created the XML file on the server to tell Magento what the module is:

app/etc/modules/Multiplies_HelloWorld.xml

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

This is the module path:

app/code/local/Multiplies/HelloWorld/etc/config.xml

<?xml version="1.0"?>
<config> 
   <modules>
     <Multiplies_HelloWorld>
       <version>0.0.1</version>
     </Multiplies_HelloWorld>
   </modules>
</config>

when i go to System/Configuration/Advanced i see a whole bunch of other modules except mine.

I tried to flush the cash, disable it, clear it manualy, restart browser, relog but still no module in my list.

The version im using is magento 1.7.0.2 (free)

Im using FileZilla to upload files.

Any suggestions would be really appreciated.

Upvotes: 0

Views: 2097

Answers (2)

jtompl
jtompl

Reputation: 1219

  1. Make sure your etc/module.xml looks like this:
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="OrgName_ModuleName" setup_version="1.0.0">
    </module>
</config>
  1. Make sure your composer.json has this:
  "autoload": {
    "files": [
      "registration.php"
    ],
    "psr-4": {
      "OrgName\\ModuleName\\": ""
    }
  }
  1. Make sure your registration.php looks like this:
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'OrgName_ModuleName',
    isset($file) && realpath($file) == __FILE__ ? dirname($file) : __DIR__
);
  1. If your module is contained in a symlinked directory that is outside of magento root directory (happens when you use local "path": as a module's repository description in composer), you have to allow magento for symlinks with: bin/magento config:set dev/template/allow_symlink 1 . See https://magento.stackexchange.com/a/315525/88882 for more info.

Upvotes: 0

Bilal Akil
Bilal Akil

Reputation: 4755

This may be a bit late, but I was just having this same problem.

After 20 minutes of chin scratching I tried resetting all caches (System > Cache Management) and then it popped up!

I'm disabling the "configuration" cache while heavily developing a module. I think that'll help reduce friction.

Upvotes: 1

Related Questions