Undefined index: parent_mlid in menu_tree_block_data()

Created on 30 December 2015, over 9 years ago
Updated 20 June 2023, almost 2 years ago
Notice: Undefined index: parent_mlid in menu_block_get_config() (line 309 of menu_block/menu_block.module.
Notice: Undefined index: parent_mlid in menu_tree_block_data() (line 348 of menu_block/menu_block.module.
Notice: Undefined index: parent_mlid in menu_tree_block_data() (line 379 of menu_block/menu_block.module.
Notice: Undefined index: parent_mlid in menu_tree_block_data() (line 401 of menu_block/menu_block.module.

I'm seeing these messages on every page load in the logs. Nothing seems to be broken. Would this be a case for an isset()?

πŸ› Bug report
Status

Needs review

Version

2.7

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States ponies Chico, CA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States cboyden

    While testing this I saw menu_block errors in the dblog:

    Menu block 1 is set to use parent menu link 0 but the menu link was not loadable or does not exist.
    
  • Status changed to Needs review almost 2 years ago
  • Open on Drupal.org β†’
    Core: 7.x + Environment: PHP 5.3 & MySQL 5.5
    last update almost 2 years ago
    Waiting for branch to pass
  • πŸ‡ΊπŸ‡ΈUnited States dsnopek USA

    @cboyden I haven't tested this, but I suspect your problem would be fixed by switching from isset() to !empty(). A patch is attached that swaps those.

  • Open on Drupal.org β†’
    Core: 7.x + Environment: PHP 5.3 & MySQL 5.5
    last update almost 2 years ago
    Waiting for branch to pass
  • πŸ‡ΊπŸ‡ΈUnited States dsnopek USA

    It looks like an instance of $config['expanded'] got converted to isset($config['expanded']) when it shouldn't have been (since this issue is just about $config['parent_mlid']

Production build 0.71.5 2024