I have my modules in ~/modules/contrib/ and releasemonitor doesn't seem to be able to pick them up. No matter how many times I tell it to refresh, I get this error:

Status not completely retrieved for contrib (adminblock, autotimezone, bookreview, captcha, content, date, nodereference, number, optionwidgets, text, userreference, weburl, codefilter, event, footnotes, glossary, gmap, gmap_location, graphstat, helptip, html2txt, htmlcorrector, iedestroyer, image_gallery, image, img_assist, inactive_user, jobposting, masquerade, members, minutes, notify, porterstemmer, print, project_issue, quotes, remember_filter, search404, signup_conflicts, signup, smileys, spam, systemaccount, tables, tasks, taxonomy_menu, textimage, tinymce, urlfilter, userlists, volunteer_timeslots, project, jscalendar) - refresh this page or run cron.php

The only modules that it lists successfully are "contrib" and releasemonitor, and I don't see a Drupal project by the name of "contrib"

I'm using Drupal 4.7.5

Comments

douggreen’s picture

releasemonitor isn't able to figure out the project names. In Drupal 4.7, releasemonitor figures out the project name by it's directory structure, since the Drupal 5 modulename.info files don't exist yet. It tries several things, but in general, it uses the project directory name. This usually works because the download files maintain this directory structure.

It can't just use the .module name because of projects like cck, that have lots of .module files, but no cck.module.

What is your directory structure? Obviously you put them in a contrib directory. Do you put them in contrib/modulename/modulename.module or contrib/modulename.module? If you use the latter, I'd suggest that you change your hierarchy.

I put mine in the sites directory. For example,

_drupal
__modules
__themes
__sites
____default
____example.com
______modules
________contrib
__________releasemonitor
____________releasemonitor.module
__________cck
____________number.module
____________content.module
________custom
______themes

This is a nuance that isn't really important to your issue. But incase it helps others, I actually organize my contrib modules by CVS tag, so that it is easier to determine versions and upgrades. For example:

_drupal
__modules
__themes
__sites
____default
____example.com
______modules
________contrib-head
__________releasemonitor
____________releasemonitor.module
________contrib-4-7
__________cck
____________number.module
____________content.module
________custom
______themes
douggreen’s picture

Title: not working » Not determining project names properly in 4.7
binford2k’s picture

They are in ~/modules/contrib/modulename/modulename.module

douggreen’s picture

I can't reproduce this.

I just want to make sure that we are communicating. Each module is in it's own directory? That is, there are no modules in ~/modules/contrib, but they are in ~/modules/contrib/adminblock/adminblock.module, ~modules/contrib/autotimezone/autotimezone.module, etc... From the error, I would think that all of your modules are in the same directory (~/modules/contrib/).

Are you using php4 or php5? I'm assuming php5...

The projectname is determined by _releasemonitor_get_psuedo_projectname, and I think that in Drupal 4.7, it's the final line (basename) that will determine it.

function _releasemonitor_get_psuedo_projectname($module, $modules) {
  // if we have a real projectname from the .info file, use it
  if ($module->projectname) {
    return $module->projectname;
  }

  // if this is a drupal core module
  if ($module->is_core) {
    return 'drupal';
  }

  // civicrm doesn't follow the standard naming conventions
  if ($module->name == 'civicrm') {
    return 'civicrm';
  }

  // check if this module's is a subproject of another
  // catches modules in projects like ecommerce
  foreach ($modules as $modulename => $parentmodule) {
    if (_releasemonitor_is_sub_project($parentmodule, $module)) {
      return _releasemonitor_get_psuedo_projectname($parentmodule, $modules);
    }
  }

  // ecommerce doesn't follow the standard naming conventions either
  if (preg_match(',/ecommerce/,', $module->filename)) {
    return 'ecommerce';
  }

  // if not set yet, the projectname is the directory name
  return basename($module->dirpath);
}

I'm a little stumped. Are you capable of doing some debugging, putting print statements in the code, and sending me the results?

douggreen’s picture

Status: Active » Closed (fixed)

I'm closing this report because I haven't heard back from the reporter since my last question, and I can't reproduce the problem. If you are able to reproduce this, please reopen the issue.