Active
Project:
Special menu items
Version:
6.x-1.5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Dec 2010 at 08:34 UTC
Updated:
31 Mar 2011 at 14:31 UTC
warning: call_user_func(summertime_menu_item_link) [function.call-user-func]: First argument is expected to be a valid callback in F:\htdocs\hd\sites\all\modules\special_menu_items\special_menu_items.module on line 125.
warning: call_user_func(summertime_menu_item_link) [function.call-user-func]: First argument is expected to be a valid callback in F:\htdocs\hd\sites\all\modules\special_menu_items\special_menu_items.module on line 125.
warning: call_user_func(summertime_menu_item_link) [function.call-user-func]: First argument is expected to be a valid callback in F:\htdocs\hd\sites\all\modules\special_menu_items\special_menu_items.module on line 125.
warning: call_user_func(summertime_menu_item_link) [function.call-user-func]: First argument is expected to be a valid callback in F:\htdocs\hd\sites\all\modules\special_menu_items\special_menu_items.module on line 125.
Comments
Comment #1
mikeker commentedIt seems to happen when a theme overrides
theme_menu_item_link. Line 125 calls the former menu_item_link function, but the theme code is not in scope.A quick fix is to move your theme override into a module.
Comment #2
mikeker commentedAnother option: implement
hook_theme()in your theme's template.php file to ensure the proper file is included before special_menu_items calls you override. Something similar to:Probably simpler than building a new module...
Comment #3
mikeker commentedAfter a bit more chasing my tail, I think this may be related to having an admin theme in addition to a main theme that overrides
theme_menu_item_link, in which case the above mentioned fix will not help.The block of code around line 125 should be:
Sorry to be polluting this thread so badly. I really hope this is the last comment I make on this issue!
Comment #4
bakr commentedYour pollution is green!
Do not worry, thanks a lot for the (p/s)olution and commitment.
Comment #5
jdanthinne commentedThe solution in #3 is almost ok with an admin theme: I don't get errors, but I don't get menus!
I've changed
return;toreturn call_user_func('theme_menu_item_link', $link);, and it seems to be working.