I had warnings on cache rebuild about a missing module:

WD system: The following module is missing from the file system: .                                               [error] 

So the missing module is "".

This came from elysia_cron, rebuilding the menu entry of "admin/config/system/cron/status" with a parent entry menu in "admin/config/system/cron" and this parent entry had an empty string in the module key.

There is this code in elysia_cron_menu()

if (EC_DRUPAL_VERSION >= 7) { 
  // Override standard cron page
  function elysia_cron_menu_alter(&$items) {
    $items['admin/config/system/cron'] = array(
      'title' => 'Cron Settings',
      'description' => 'View and manage cron table',
      'page callback' => 'elysia_cron_admin_page',
      'access arguments' => array('administer elysia_cron'),
    );   
  }
}

Enforcing the module record like that solved the issue:

if (EC_DRUPAL_VERSION >= 7) { 
  // Override standard cron page
  function elysia_cron_menu_alter(&$items) {
    $items['admin/config/system/cron'] = array(
      'title' => 'Cron Settings',
      'description' => 'View and manage cron table',
      'page callback' => 'elysia_cron_admin_page',
      'access arguments' => array('administer elysia_cron'),
      'module' => 'elysia_cron',
    );   
  }
}
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

regilero’s picture

patch attached.

Some recent issues are maybe linked to that, #2389835 or #2351151

Simon Georges’s picture

Simon Georges’s picture

Status: Active » Needs review

Changing status, as there is a patch.

joelpittet’s picture

Status: Needs review » Reviewed & tested by the community

Tracked this down with the help of this core patch: #1081266: Avoid re-scanning module directory when a filename or a module is missing

This is RTBC even though the patch file extension is .txt, it's still a valid patch:)

chaby’s picture

FileSize
435 bytes

Huuum, I think that 'module' key should still be "system" (even if it doesn't make sense anymore, it seems to be used with menu links).

Anyway, this issue seens to happen because with this hook, you are supposed to override only what you need, not the entire menu entries. That's why 'module' key is removed accidentally (added by menu_router_build()).

So here is an another patch for purpose only which should fix it by altering only what's needed. Not tested because I strangely cannot reproduce it, that's why I did'nt revert the issue status to needs review.

Fabianx’s picture

RTBC for #5

joelpittet’s picture

Thanks @chaby and @Fabianx shouldn't it also help find where the callback is by loading the correct module?

I like the idea of unioning on the defaults, though not sure where 'file' was pointing before, I'd like to step through this.

joelpittet’s picture

Ok cool, tested and no issues to speak of, only diff is the #weight get's set from the original and an argument is passed into the page callback, but it's not used.

RTBC+1 on #5

chaby’s picture

@joelpittet :

shouldn't it also help find where the callback is by loading the correct module?

If you are talking about the key 'module', it don't think so. Because first of all, all .module files are already loaded at bootstrap level before dealing with the menu router. Then, it should be keys 'file' and 'file_path' which help to find the callback (i.e : load an extra files not already included).

But as say in #5, I think that key 'module' is only used when (re)building menu links mapped with menu router (menu links have a reference to the module)...However, I'm not sure and did'nt have time to investigate more on it. In fact to be honest, I never paid attention to this because I always override menu entries in that way (so keeping the original 'module' key) without any problems...

Anyway, I'm curious to have the answer !

Fabianx’s picture

So a wrong module is likely only a problem if you use a module like 'js' that needs to work outside of a full bootstrap. (and that has a whole slew of other problems)

And even then this probably will use more the 'include_file' key of the menu router. (@see https://api.drupal.org/api/drupal/includes%21menu.inc/function/menu_exec...)

So I don't think 'module' or any other key in there is ever used inside of Drupal core, so this should be okay.

joelpittet’s picture

Bump

  • kala4ek committed 40d1fe4 on 7.x-2.x authored by chaby
    Issue #2407129 by chaby, regilero, joelpittet, Fabianx: Missing module...
kala4ek’s picture

Status: Reviewed & tested by the community » Fixed

Great, committed to latest dev.

joelpittet’s picture

Thank you @kala4ek

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.