- Issue created by @n.ghunaim
When attempting to move a block within Layout Builder for a dashboard entity provided by the Dashboard module → , a fatal error occurs because the dashboard entity does not utilise an Entity View Display. Layout Builder Restrictions expects a valid view display to be available. Since dashboards do not define or use view modes or view displays by default, the method blockAllowedinContext() receives a NULL value, causing a fatal error:
Error: Call to a member function getThirdPartySetting() on null in EntityViewModeRestriction->blockAllowedinContext()
This makes it impossible to move blocks in the dashboard layout when Layout Builder Restrictions is enabled.
Add a null check inside EntityViewModeRestriction::blockAllowedinContext() to skip restrictions if no view display is available.
Active
3.0
Code