mirror of
https://github.com/getgrav/grav.git
synced 2026-05-06 15:57:14 +02:00
Bug fix on page admin being disabled
This commit is contained in:
@@ -1289,12 +1289,10 @@ class Pages
|
||||
static function (Event $event) use ($directory) {
|
||||
$grav = Grav::instance();
|
||||
[,$location,] = $grav['admin']->getRouteDetails();
|
||||
if ($location !== 'pages') {
|
||||
if ($location !== 'pages' || isset($grav['flex_objects'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
$event->stopPropagation();
|
||||
|
||||
/** @var PageInterface $page */
|
||||
$page = $event['page'];
|
||||
$page->init(new \SplFileInfo('plugin://admin/pages/admin/error.md'));
|
||||
|
||||
Reference in New Issue
Block a user