Fatal error: Call to undefined function menu_item_link()

ToshoFreny - April 20, 2008 - 07:12
Project:Advanced Theme Construction Kit (ATCK)
Version:6.x-1.0
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:by design
Description

Just now installed ATCK on my localhost to find out what it is and go this error after enabling the theme ATCK. The drupal version am using is 6.2 and is clean without any additional modules or changes.

Fatal error: Call to undefined function menu_item_link() in C:\Program Files\EasyPHP 2.0b1\www\drupal62\themes\atck\template.php

#1

ToshoFreny - April 20, 2008 - 07:15
Title:Fatal error: Call to undefined function menu_item_link()» Addtional information for clarification

I deleted the atck folder as my site became inaccessible and found these warnings in the un themed site.

    * warning: array_map() [function.array-map]: Argument #2 should be an array in C:\Program Files\EasyPHP 2.0b1\www\drupal62\modules\system\system.module on line 975.
    * warning: array_keys() [function.array-keys]: The first argument should be an array in C:\Program Files\EasyPHP 2.0b1\www\drupal62\includes\theme.inc on line 1712.
    * warning: Invalid argument supplied for foreach() in C:\Program Files\EasyPHP 2.0b1\www\drupal62\includes\theme.inc on line 1712.

#2

ToshoFreny - April 20, 2008 - 07:16
Title:Addtional information for clarification» Fatal error: Call to undefined function menu_item_link()

#3

Caleb G - April 20, 2008 - 20:27
Status:active» by design

Hi ToshoFreny,

The function menu_item_link only exists in the Drupal 5 version of atck - try installing the Drupal 6 version and you should be alright. :-)

#4

sidmacleod - June 5, 2008 - 15:08

That's not true....

I could not find the menu_item_link() function anywhere in my Drupal 6.2/atck install, and it *is* called.

Lines 178-9 of template.php v.6x-1.0:

function phptemplate_menu_item($mid, $children = '', $leaf = TRUE, $extraclass = '') {
  return '  <li class="'. ($leaf ? 'leaf' : ($children ? 'expanded' : 'collapsed')) . ($extraclass ? ' ' . $extraclass : '') . '">'. menu_item_link($mid, TRUE, $extraclass) . $children ."</li>\n";

#5

Caleb G - June 5, 2008 - 17:56

I guess I should have qualified that - it is only in the 5.x version AND 6.x versions which specifically say "Commit broken. Do not use.". ;-)

Get the latest 6.x-2.2 version and you should be ok. :-)

 
 

Drupal is a registered trademark of Dries Buytaert.