Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | menu_block-1688168-2.patch | 482 bytes | tim.plunkett |
#1 | menu_block-1688168-1.patch | 701 bytes | tim.plunkett |
Comments
Comment #1
tim.plunkettSomething like this.
Comment #2
tim.plunkettFound another occurrence of the error, fixing it at the source.
Comment #3
jweowu CreditAttribution: jweowu commented#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.
Comment #4
JohnAlbinWorks for me! :-)
Thanks, Tim!
Comment #5
jweowu CreditAttribution: jweowu commentedJohnAlbin, 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.