Closed (fixed)
Project:
Hierarchical Select
Version:
7.x-3.x-dev
Component:
Code - Menu
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Dec 2011 at 10:11 UTC
Updated:
2 Oct 2012 at 01:16 UTC
Jump to comment: Most recent file
Comments
Comment #1
firebird commentedHere's a patch that makes hs_menu_hierarchical_select_valid_item() call menu_get_menus() instead.
Comment #2
andypostsuppose isset() a bit better
Comment #3
firebird commentedI think (can't remember, though) that I used array_key_exists for a reason. If $parts[0] is set to NULL, isset() will return FALSE, whereas array_key_exists() will return TRUE.
Comment #4
andypostI'm not sure that menu_get_names() returns a keyed array.
But checking for NULL inside array seems useless
Comment #5
Road Kill commentedThanks for the patch Firebird I tried the patch but now I am getting
Notice: Undefined variable: parts in hs_menu_hierarchical_select_valid_item() (line 166 of C:\wamp\www\mysite\sites\all\modules\hierarchical_select\modules\hs_menu.module).
Any ideas anybody
Comment #6
wim leers@firebird: thanks! Perfect one-liner :) I also read #784856: Menu_get_names() is dead code, remove it and commented on menu_get_names()' docs: http://api.drupal.org/api/drupal/includes%21menu.inc/function/menu_get_n....
Commit: http://drupalcode.org/project/hierarchical_select.git/commit/4b88100.
Comment #8
xbery commentedThis issue is actually still active. Sorry to reopen this but I had to manually patch the hs_menu.module file. Could the patch mentioned in #6 be committed in next release? It works great.
Comment #9
wim leersIt has been committed. No new release has been tagged though.
Comment #10
xbery commentedYep I realised that the moment I posted this comment :-) Though it makes it harder for us who use this great module :-) I really appreciate the work that has been made but issues as serious as this must be fixed when solution is known and agreed to. Just my opinion :-)
(I got really scared when I couldn't save any menu item)
Comment #10.0
xbery commentedSpecified where the adding of menu links doesn't work.