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.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | lt-set-active-trail.patch | 1.23 KB | hunmonk |
| #2 | logintoboggan.897540.new_.patch | 1.09 KB | leksat |
| logintoboggan.patch | 1.19 KB | leksat |
Comments
Comment #1
neochief commentedPlease, resubmit patch against HEAD of 6.x-1.x branch.
Comment #2
leksat commentedHere new patch.
Comment #3
hunmonk commentedthis 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.
Comment #4
leksat commentedI test your patch - it works perfect.
Thanks.
Comment #5
neochief commentedComment #6
hunmonk commentedbefore 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.
Comment #7
grasmash commentedIt 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...
Comment #8
Gabriel R. commentedSubscribe.
Comment #9
SchwebDesign commentedhttp://drupal.org/node/897540#comment-3422686 fixed the error for me as well - thanks!
Comment #10
myha commentedPatch from #3 works for me too. hunmonk, thank you!
Comment #11
SpiesInOrbit commented#3 Did NOT work for me
Comment #12
stevecowie commentedVersion no longer supported