When using the "menu selected by the page" content type, menu_tree_build() is empty in the Panels UI, and the checks for subject/content in menu_block_menu_tree_content_type_admin_info() cause notices.

Unlike in menu_block_block_view(), something should be returned here.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tim.plunkett’s picture

Status: Active » Needs review
FileSize
701 bytes

Something like this.

tim.plunkett’s picture

FileSize
482 bytes

Found another occurrence of the error, fixing it at the source.

jweowu’s picture

Status: Needs review » Reviewed & tested by the community

#2 successfully tested, and it looks like the correct fix to me:

menu_tree_build() is called by:

* menu_block_block_view()
* menu_block_menu_tree_content_type_render()
* menu_block_menu_tree_content_type_admin_info()

Neither _block_render_blocks() nor render_pane() will display anything for a block with an empty content property, so there is no danger of rendering anything unintentional by populating the subject property.

Please note that this patch (and review) also applies to the 7.x-2.x branch. I believe it can be committed to both 2.x and 3.x.

JohnAlbin’s picture

Version: 7.x-3.x-dev » 7.x-2.x-dev
Status: Reviewed & tested by the community » Fixed

Works for me! :-)

Thanks, Tim!

jweowu’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev

JohnAlbin, I can see that you've committed this to the 2.x branch (thanks), but it hasn't been committed to the 3.x branch?

Edit: it's been merged into 3.x now.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.