I can't even imagine why this is happening, but it is...

I have Advanced User Profile going on my site, with panels, content complete, chaos tools, etc... standard APK setup, nothing extra there.

If I have Menu Icons enabled, I get the white screen of death on any user profile I try to load. If I disable it, they show fine. My error logs show the following:

PHP Fatal error: Unsupported operand types in /home/talksv/public_html/includes/common.inc on line 1552

I'm running Drupal 6.13.

CommentFileSizeAuthor
#13 509444.patch455 bytesstella
#13 509444.patch455 bytesstella

Comments

skilip’s picture

Are you still experiencing this problem? It should have been fixed with the latest version of Menu Icons

skilip’s picture

Status: Active » Postponed (maintainer needs more info)
djudd’s picture

The workaround helped, but without that, yes, I'm still experiencing the issue with the latest version of Menu Icons.

shaman365’s picture

Thank you for your work on this great module. Yet, I'm seeing the same issue as well wen I have the menu icons enabled ...tried to get it working for about 5 hrs now. The workaround didn't get it going and I even added the recent patch.

Would love to use this on a clients site. Anyone have any ideas?

parasolx’s picture

I found some new problem today.

I install this module together with Panel 3 + Chaos Tools.

This module will shown the same error if the sites have install this problem.

I try hack the common.inc file referring towards this site: http://justinhileman.info/articles/unsupported-operand-types-in-drupal-6x

But still error is there. So i think, we should work up against since i found this module quite nice to my site.

schmoell’s picture

here is a backtrace with menu_icons & panels enabled

Array
(
[0] => Anzeigen
[1] => start
[2] =>
)

#0 l(Anzeigen, start, ) called at [/site/modules/menu_icons/menu_icons.module:249]
#1 _menu_icons_menu_item_link(Array ([href] => start,[title] => Anzeigen,[type] => 136,[weight] => -10,[access] => 1))
#2 call_user_func_array(_menu_icons_menu_item_link, Array ([0] => Array ([href] => start,[title] => Anzeigen,[type] => 136,[weight] => -10,[access] => 1))) called at [/site/includes/theme.inc:617]
#3 theme(menu_item_link, Array ([href] => start,[title] => Anzeigen,[type] => 136,[weight] => -10,[access] => 1)) called at [/site/modules/ctools/includes/menu.inc:335]
#4 ctools_menu_local_tasks(0, 1) called at [/site/modules/ctools/includes/menu.inc:475]
#5 ctools_menu_tab_root_path() called at [/site/modules/ctools/includes/menu.inc:446]
#6 ctools_menu_get_active_help() called at [/site/httpdocs/modules/ctools/includes/menu.inc:436]
#7 ctools_menu_help()
#8 call_user_func_array(ctools_menu_help, Array ()) called at [/site/httpdocs/includes/theme.inc:617]
#9 theme(help) called at [/site/httpdocs/includes/theme.inc:1814]
#10 template_preprocess_page(Array ([template_files] => Array (),[content] =>

the problem is this call to l()

function _menu_icons_menu_item_link($link) {
if ($link['options']['icon']['enable'] && file_exists($link['options']['icon']['path'])) {
$link['localized_options']['html'] = TRUE;
$link['localized_options']['attributes']['class'] = "menu_icon menu-". $link['mlid'];
return l($link['title'], $link['href'], $link['localized_options']);
}

any help/fix is highly appreciated

schmoell’s picture

This seems to help

function _menu_icons_menu_item_link($link) {
if ($link['options']['icon']['enable'] && file_exists($link['options']['icon']['path'])) {
$test=array(
'attributes' => array('class' => "menu_icon menu-". $link['mlid']),
'html' => TRUE,
);
return l($link['title'], $link['href'], $test);

}
else {
return l($link['title'], $link['href'], array());
}

rickh’s picture

I have the same problem but unfortunately non of the above solutions work for me. I have a lot of pages that use panels (panels 6.x-3.0) so panles is must module for me. I would really like to use the menu-icons module because it worked great for me on other sites. Is there a patch coming soon or is there another way I can fix this?

Any help will be appreciated

Rick

lejon’s picture

@ schmoell

can you explain where to put the code? Should I just paste it at the bottom of the menu_icons.module file?

Thanks

jason.lally@gmail.com’s picture

lejon,

Just fixed this using schoell's method and it worked. Don't just paste it at the end. You need to replace the existing _menu_icons_menu_item_link() function or at least comment it out.

Worked like a charm for me.

Jason

tsi’s picture

Couldn't get it to work, using all the latest versions (Nov. 20)
Subscribing to follow this...

stella’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new455 bytes
new455 bytes

Here's a patch that fixes the problem - it's a patch against the latest stable version.

skilip’s picture

Status: Needs review » Fixed

Sorry for late responding Stella, and thanks for the patch. The latest release (6.x-2.1) doesn't require this patch anymore.

gmateos’s picture

Status: Fixed » Needs review

hi skilip, i tested last release 2.2 and doesn't solve this problem. Stella's patch is still needed and solve the problem. I think this issue is not solved. I change status to need review.

gmateos’s picture

Status: Needs review » Fixed

sorry, i made a mistake here. I didn't test properly release 2.2.
The issue was fixed in 2.2

Status: Fixed » Closed (fixed)

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