When using Taxonomy Menu with large taxonomies, the menus tend to become equally large. HS solves a lot of these problems but one still remains: If there are one or more large menus in the system, _all_ of the menu items in _all_ of those menus are printed to a single select element on the Edit Vocabulary form. This can make the loading of the page slow enough for the system to time out.

Replacing the single select with a HS element solves this problem.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

firebird’s picture

Status: Active » Needs review
FileSize
2.02 KB

The attached patch adds Taxonomy Menu support to hs_menu.

Unfortunately, this patch conflicts with the patch (fix_hs_menu_array_warning-1304002-2.patch) described here: http://drupal.org/node/1304002 . This means that until one of the patches is committed to dev and the other patch edited accordingly, one of the patches needs to be applied manually.

firebird’s picture

Right. I guess I should've tested a bit more. The patch "works", but it doesn't exactly make the loading of the page faster. This is probably due to the pending performance issues in HS. Once loaded, the page works as it should, with the HS element.

Wim Leers’s picture

Status: Needs review » Needs work

#1304002: [explode() expects parameter 2 to be string, array given in menu_node_submit()] warning msg is now no longer necessary, since #1272538: Hierarchical Select Menu should also flatten on submit of node forms has been committed. Please reroll your patch accordingly.

Also:
- "submit callback", not "submit handler"
- due to #1271386: Hierarchical Select Menu should respect menu_options having been committed, you may also pass in a 'type' — I don't know if it's necessary, you'll have to look into that (I don't know how Taxonomy Menu works)
- please either reuse hs_menu_menu_edit_item_form_submit() or hs_menu_node_form_submit(), if not, please create a unifying alternative, with the exact location within the $form_state['values'] array being stored somewhere in $form_state['storage']['hs']['hs_menu']