I tried installing admin_menu module. I get a blank screen after enabling the module. I looked in php error logs and found the following error message
PHP Fatal error: Call to undefined function drupal_add_css() in <drupalinstallpath>/modules/admin_menu/admin_menu.module on line 40. Deleteing the admin_menu dir in modules restores original functioning.

drupal_add_css seems to be available in 5.X only. I googled around and found this link http://drupal.org/node/52508#comment-79259 which seems to contain a solution, but I know next to nothing about drupal to fix it myself.

thanks,
TL

CommentFileSizeAuthor
#2 admin_menu.module_4.patch668 bytessun

Comments

timelord2k’s picture

Assigned: timelord2k » Unassigned

As per the link in original file, I was able to fix the problem. There might be more elegant solution.
I still had problem, due to my theme bluebreeze. The menu was displayed longitudinally instead of horizontal on the top. Editing the themes' style.css appropriately fixed it.

 $css_files = array();
     /* $css_files[] = array(
        'file' => drupal_get_path('module', 'admin_menu') . '/admin_menu.css',
        'type' => 'module',
      ); */

      drupal_set_html_head(theme('stylesheet_import', base_path() . drupal_get_path('module', 'admin_menu') .'/admin_menu.css'));
      if (file_exists(path_to_theme() . '/admin_menu.css')) {
        $css_files[] = array(
          'file' => path_to_theme() . '/admin_menu.css',
          'type' => 'theme',
        );
      }
sun’s picture

Title: drupal_add_css undefined in admin_menu.module » Wrong way to include stylesheet
Category: support » bug
Status: Active » Needs review
StatusFileSize
new668 bytes

This patch changes the inclusion of admin_menu.css following http://drupal.org/node/52508#comment-79259 .

Remember that this will only apply to the 4.7 release of Admin Menu.

sun’s picture

Title: Wrong way to include stylesheet » Wrong inclusion of stylesheet
Assigned: Unassigned » sun
Status: Needs review » Fixed

Committed to DRUPAL-4-7.

Anonymous’s picture

Status: Fixed » Closed (fixed)