Null warning on end() Breadcrumb won't display correctly for role without proper permission

Created on 23 February 2021, over 3 years ago
Updated 5 October 2023, 9 months ago

Problem/Motivation

  • Warning๏ผšend() expects parameter 1 to be array, null given ๆ–ผ _entityqueue_set_breadcrumb() (/var/www/docroot/sites/all/modules/contrib/entityqueue/entityqueue.module ไธญ็š„็ฌฌ 1209 ่กŒ)ใ€‚
  • This is cause by populating breadcrumb menu links which aren't accessible by the current user in whilst other links are. The inaccessible links returns NULL on end($menu_item['map']).

    Steps to reproduce

    1. Create contents and assign entityqueue.
    2. Allow a new role to control access of entityqueue without giving the accessibility of other admin menu.
    3. Masquerade as new role.
    4. Enter the "Edit items" page of an entityqueue edit page. ( ex:
    admin/structure/entityqueue/list/entityqueue_block_custom/subqueues/1/edit?destination=admin/structure/entityqueue).
    5. See error message

    Proposed resolution

    Add condition to check if $menu_item['map'] and $last_item exists.

    ๐Ÿ› Bug report
    Status

    Fixed

    Version

    1.0

    Component

    Code

    Created by

    ๐Ÿ‡น๐Ÿ‡ผTaiwan g-brodiei

    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.

    Production build 0.69.0 2024