The Case of the Missing Menu Module

Posted 6 June by admin Development 0  Comments

Error message

Notice: Undefined offset: 0 in include() (line 32 of /home4/jasonsaf/sites/jsafro.com/docroot/sites/all/themes/md_bigstream/templates/view/view_block/team/views-view-unformatted--md-team--random.tpl.php).

The game is afoot.

The Problem

You are looking at the Drupal module admin UI. You can't enable the Menu Block module because on of the requirements, the Menu module, is missing. Only, the Menu module can't be missing; it's part of Drupal core. Browsing the files in the core modules directory (.../modules, not .../sites/all/modules), you can see that the file is where it is supposed to be. The contents look right. So, why can't Drupal find it?

A Clue

When Drupal bootstraps, it builds a list of .module files keyed by module name and containing the path to each .module file. What would happen if Drupal found two .module files with the same module name?

The Solution

Search to see if there are two .module files with the same module name. In this case, someone (someone not me) copied .../modules/menu/menu.module to .../sites/all/modules/menu.module. Why? I don't know. But, I do know why Drupal was unable to find the menu module. And when I deleted the duplicate menu.module file, I solved the Case of the Missing Menu Module.

Leave a comment