I downloaded Nice Menus 6.x-2.1-beta1 and right after the installation and enabling, I got the following cryptic warning:

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'theme_nice_menu_primary_links' was given in /sites/your.johnsonfamilynews.net/web/includes/theme.inc on line 656.

What can I do to fix this?


sknight’s picture

I'm getting the same issue after upgrading the module on my drupal site.

VM’s picture

Status: Active » Postponed (maintainer needs more info)

update to beta2 (the latest release) and test.

sknight’s picture

Version: 6.x-2.1-beta1 » 6.x-2.1-beta2

It's producing the same error I'm afraid.

BradleyT’s picture

Do a scan of your site files to find all occurrences of theme_nice_menu_primary_links and update to theme_nice_menus_primary_links. Most likely this will be called from a template file. Notice the S on menus.

sknight’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

You're right, theme_nice_menu_primary_links was in a page.tpl.php file.

Thanks for your help!

VM’s picture

Category: bug » support
Status: Closed (fixed) » Fixed

Status: Fixed » Closed (fixed)

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

BrightBold’s picture

Oh thank you! This has been driving me crazy.
This apparently will also occur if you're calling nice menus directly in your page template. The code

			<?php if (in_array('nice_menus', module_list())) {
				$menu = theme('nice_menu', 1, 'primary-links', NULL, 'down');
				print $menu['content'];

Should be

			<?php if (in_array('nice_menus', module_list())) {
				$menu = theme('nice_menus', 1, 'primary-links', NULL, 'down');
				print $menu['content'];

instead. (Note: second line should be 'nice_menus' plural.)

sidharth_k’s picture

Thanks this helped!!