[LocalTaskManager] - Call to a member function getRouteName() on null

Created on 25 January 2024, about 1 year ago
Updated 27 January 2024, about 1 year ago

Problem/Motivation

When using content moderation sometimes site throws this error.
Call to a member function getRouteName() on null in Drupal\Core\Menu\LocalTaskManager->getTasksBuild() (line 297 of /var/www/html/docroot/core/lib/Drupal/Core/Menu/LocalTaskManager.php).

Steps to reproduce

Create a Node.
Edit the node and change it a bit and save it as draft.
It only occurs sometimes.

Proposed resolution

Found that sometime drupal doesn't find latest_version_tab plugin and send null in route we need array_filter to check if $tree shouldn't have any null entry.

Merge request link

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

10.2

Component
Menu system 

Last updated 7 days ago

Created by

🇮🇳India zeeshan_khan

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

Comments & Activities

Production build 0.71.5 2024