I have written custom module that I am trying to install.

the module is called "scorecard" and all of the files are located in

sites/default/modules/scorecard

and the scorecard.info file is as follows:

;$ID$

name = Scorecard
description = A module for tracking scores
package = Drupal 7 Development
core = 7.x
files[] = scorecard.module
files[] = scorecard.controller.inc
files[] = scorecard.install

I am running Drupal 7.21 and thought that Drupal would just recognize it when I navigated to "Modules" as Admin, but it just doesn't show up. I assume there is something very basic that I am not doing, but at the moment I have no idea.

thanks

Comments

Drave Robber’s picture

The file seems mostly good. Browser cache, perhaps?

Minor notes:

  • ;$ID$ is long obsolete (was used back when drupal.org was using CVS);
  • .module and .install files do not need to be declared in .info.

Neither of these is likely to do any real harm though.

fndtn357’s picture

I would recommend putting the code in sites/modules/all/custom/[yourmodule] and see if Drupal notices it. I don't use default for anything except the files folder and the settings.php.

sevenBananas’s picture

Thanks, that did the trick, created a custom folder & dropped it in and drupal picked it right up

DanZ’s picture

To avoid confusion, custom modules should go into sites/all/modules or a subdirectory. sites/all/modules/custom is fine (and not quite what got typed above).

--
www.ztwistbooks.com. Math books that are actually fun.

Leo Pitt’s picture

For the info of others - I had this issue and the problem turned out to have been caused by the character encoding of the text editor I'd used to create the custom module. For some reason, my editor (notepad++) was using Macintosh EOL format - something not obvious at all - but this was preventing Drupal from discovering the module.

So my advice to others in this situation, in addition to the responses above, is: check your module's character encoding and EOL format by comparison to another module that works fine.

gparsloe’s picture

Hello. I had the correct path (sites/all/modules/custom), but the wrong installation (have several Acquia Dev Desktop installations). Once I put the .info and .module files into the correct installation, my custom module showed up in the modules list. Thanks again!

fyberoptik’s picture

Always double check your file names!!!!

I was tripped up by the file extension, my_module.modules should of been my_module.module

lk7889’s picture

Just in case anyone ends up here looking for an answer and these aren't helping...

I had a similar issue and it turned out that I'd accidentally uploaded the modulename.module file to the sites/all/modules folder in addition to the sites/all/modules/modulename folder. That caused Drupal to think the file was missing. I had to delete the one from sites/all/modules to get it to recognize the one in the sites/all/modules/modulename folder.

*facepalm*

FalcoBar’s picture

i was searching like ages... thank you so much :)

bribread22’s picture

A .info file but no .module file would make the module not show up in /admin/modules. Both files need to be present in order for the module to show up in the list of modules. The module list is not cached in Drupal, so this would likely indicate a problem with the file configuration/missing files. Also, the directory for the module must be located in sites/all/modules or sites/all/modules/custom for Drupal to recognize your module.