Closed (fixed)
Project:
Menu Block
Version:
7.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Jun 2011 at 16:10 UTC
Updated:
18 Mar 2013 at 13:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
bartk commentedNote that I'm not the only site this has happened to... A google search for the error has revealed a cached page with the same issue:
http://webcache.googleusercontent.com/search?q=cache:C3J3Gk4LoyQJ:www.nu...
Comment #2
bartk commentedI've got a fix for this that gets rid of the error message.
In menu_block.module, in the function menu_tree_add_active_path, change:
if ($tree_with_trail[$key]['link']['in_active_trail']) {to
if ($tree_with_trail[$key]['link']['in_active_trail'] && array_key_exists($key, $subtree_pointer)) {(around line 423)
It looks like the menu_tree_page_data is returning active trail items that aren't actually in the menu, but the function as it stands is assuming that they are.
Comment #3
isaacfreeman commentedI add this issue too, on many admin pages. BartK's fix has done the trick.
Comment #4
justmagicmaria commentedSame. Note I changed the issue title since this isn't just on forums. BartK's fix worked for me too.
Comment #5
TimelessDomain commented#2 works.
Comment #6
jras commented#2 worked for me as well.
Comment #7
pjcdawkins commentedHere's a patch version of BartK's fix in #2.
Comment #8
acrollet commentedPatch in #7 works for me, leaving as RTBC.
Comment #9
tjg commentedAny chance this patch will be included in menu_block soon?
Comment #10
tim.plunkettThe
array_key_exists()portion should be replaced withisset($subtree_pointer[$key]), see http://php.net/array_key_exists#example-4540Comment #11
Rory commented@tim.plunkett - I couldn't find the example you were specifically linking to. But I thought this might be it: http://php.net/manual/en/function.array-key-exists.php#87491
Comment #12
mrharolda commentedRerolled the patch with isset() like tim.plunkett suggested.
This patch fixes these notices:
Comment #13
mrharolda commentedForgot to set status to 'needs review'...
Comment #14
pjcdawkins commented#12 works for me
Comment #15
lstoetzel commented#12 works for me
Comment #16
gmclelland commentedPatch in #12 worked for me.
Comment #17
pjcdawkins commentedStill works for me! Marking RTBC.
Note that this issue is for the -2.x branch while there's also a -3.x. It looks like it's fairly trivial to produce a similar patch for 3.x, but let's keep this thread simple until the maintainer responds.
Comment #18
gmclelland commentedSorry, I spoke to soon. The error I see is bit different and doesn't apply to this issue.
Comment #19
ayalon commentedTested and working
Please commit it.
Comment #20
Mirroar commentedConfirming that it works for me as well. Thanks for the patch!
Comment #21
jci commentedWorks for me - thanks! Please commit it.
Comment #22
Cauliflower commentedPatch in #12 works as expected.
Comment #23
johnalbinFixed. http://drupalcode.org/project/menu_block.git/commitdiff/c7c644b