Similar to #3209342: Links without "original_link" are filtered by admin_toolbar_links_access_filter I ran in to an exception due to non-existent "original_link":

The website encountered an unexpected error. Please try again later.
Error: Call to a member function getMenuName() on null in admin_toolbar_links_access_filter_preprocess_menu() (line 48 of modules/contrib/admin_toolbar/admin_toolbar_links_access_filter/admin_toolbar_links_access_filter.module).

In my case, I'm creating a faux menu and setting a custom #theme key so I can have a `menu--event.html.twig`. Then just adding #items to the render array...so it's basically all outside of the standard menu-building handlers. E.g.

$menu['#theme'] = 'menu__event';
foreach ($items as $index => &$item) {

  ...

  $menu['#items'][] = [
    'title' => $title,
    'url' => $url,
  ];
}
CommentFileSizeAuthor
#2 3219154-original-link-exception.patch1.33 KBnatemow

Comments

natemow created an issue. See original summary.

natemow’s picture

StatusFileSize
new1.33 KB

Patch attached.

natemow’s picture

Issue summary: View changes
dydave’s picture

Status: Active » Closed (outdated)

No activity on issue for more than 4 years.
Closing: outdated.

Thanks!