DashboardLocalAction results in WSOD on dashboard route if no dashboard exists

Created on 19 July 2023, over 1 year ago
Updated 30 April 2024, 7 months ago

Problem/Motivation

When the module is initially installed and no Dashboard entity was create the /admin/dashboard page fails with
Error: Call to a member function id() on null in Drupal\dashboard\Plugin\Menu\LocalAction\DashboardLocalAction->getRouteParameters() (line 59 of modules/custom/penyaskito-3327580/src/Plugin/Menu/LocalAction/DashboardLocalAction.php).

Breaking change was introduced in πŸ› Provide local task for editing current dashboard layout Fixed

Steps to reproduce

- Install the sandbox module on the fresh Drupal copy - don't use default content from https://github.com/penyaskito/dashboard-initiative/tree/main/web/modules...
- Log in as UID 1
- Go to /admin/dashboard page - observe the site crash

Proposed resolution

Dashboard menu item should be inaccessible if no dashboards were created.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡³πŸ‡΄Norway zaporylie

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024