Hi.

Conditions.
User accounts was not available to view by anonymous users. LoginToboggan "Present login form on access denied (403)" option was enabled. I tried to access user/1 page as anonymous.
I got "Fatal error: Unsupported operand types in common.inc on line 1598".

I found the reason. This was happen, because LoginToboggan set $_GET['q'] = "user" in logintoboggan_denied() function.

In menu_get_active_breadcrumb() function Drupal check active path for access and (as "user" is normal accessibility drupal path) start to render breadcrumbs.
But menu_get_active_trail() function was run before and $trail was cached in static variable, which contain disallowed path ("user/1").

Drupal menu system not create localized_options for item array, which access denied.
So, drupal render breadcrumbs from trail, which contain item without localized_options, which must be passed to l() function (see menu_get_active_breadcrumb()).

This issue not appear on clean drupal installation. But, may cause with another modules that uses menu_get_active_trail() function (ex. context module).

I'm attached patch for 6.x-1.7 version.
Not sure, that this is best way for fix that problem. But I'm too tired by catching that bug.

---
Alexander.

Comments

neochief’s picture

Status: Active » Needs review

Please, resubmit patch against HEAD of 6.x-1.x branch.

leksat’s picture

StatusFileSize
new1.09 KB

Here new patch.

hunmonk’s picture

Priority: Critical » Normal
StatusFileSize
new1.23 KB

this doesn't seem like the right approach to me -- seems better to also reset the menu trail. please try the attached patch and let me know how it works.

thanks.

leksat’s picture

I test your patch - it works perfect.
Thanks.

neochief’s picture

Status: Needs review » Reviewed & tested by the community
hunmonk’s picture

Status: Reviewed & tested by the community » Postponed (maintainer needs more info)

before i commit this, would somebody please check to see if this problem exists in the 5.x version of the module?

if so, we'll need to figure out a fix for that as well, as menu_set_active_trail() doesn't exist in 5.x.

grasmash’s picture

It took me quite a long time to track down the source of this bug. I'm experiencing with when using Logintobaggan 6.x-1.9 with rules. Can we commit this? I don't have any installations of 5.x to check this on...

Gabriel R.’s picture

Subscribe.

SchwebDesign’s picture

http://drupal.org/node/897540#comment-3422686 fixed the error for me as well - thanks!

myha’s picture

Patch from #3 works for me too. hunmonk, thank you!

SpiesInOrbit’s picture

#3 Did NOT work for me

stevecowie’s picture

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

Version no longer supported