Notice: Undefined index: depth_relative in menu_tree_block_data() (line 360 of menu_block.module).
The 7.x-2.6 version added relative depth to menu block configuration which is great. However, if someone has existing sites with many menu blocks configured (at least using panels), $config['depth_relative'] will not exist in the configuration for any of them until each and every panel pane/block is re-saved. And all of them will throw errors.
That places quite a burden on folks attempting to upgrade large numbers of sites.
Could you wrap the new variable in isset? Example:
if (isset($config['depth_relative']) && $config['depth_relative']) {
}
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | menu_block-check-depth_relative--2499733-1.patch | 957 bytes | osopolar |
Comments
Comment #1
osopolarPatch fixes that as suggested above. If this is not an option there should be an update hook setting the missing variable. This could be difficult for panels.
Comment #2
osopolarComment #3
danepowell commentedPatch in #1 looks good and worked for me.
Comment #4
jastraat commented@osopolar - could you add credit since I debugged the issue and suggested the fix?
Comment #5
osopolarI am not a module maintainer. You may just create a new patch and add your credits.
Comment #6
geerlingguy commented+1 - just noticed this new notice popping up everywhere :P
Comment #7
maxplus commentedThanks,
#1 solved this issue for me
Comment #8
dman commented+1
Patch applies well. Would be good to clean this up.
Comment #10
dave reidCommitted #1 to 7.x-1.x.