View site in Maintenance Mode 5.7 version

Permalink
I was searching how to edit page when Maintenance mode is enabled and can't find solution to 5.7 version. Only this wrong link:
http://www.concrete5.org/documentation/how-tos/administrators-maint...

Can anyone help me and explain why administrators can't view and edit page?

 
andrewjaff replied on at Permalink Reply
andrewjaff
sweszler replied on at Permalink Reply
Thanks andrewjaff
I saw that, but in 5.7 can't find this file:
/concrete/startup/maintenance_mode_check.php
I was looking for, but I don't understand good enough how it works in 5.7.
buurvrouw replied on at Permalink Reply
buurvrouw
andrewjaff replied on at Permalink Reply
andrewjaff
Hi,

First open:
concrete/src/Routing/DispatcherRouteCallback.php


You will see
if ((!$c->isAdminArea()) && ($c->getCollectionPath() != '/login')) {
            $smm = Config::get('concrete.maintenance_mode');
            if ($smm == 1 && ($_SERVER['REQUEST_METHOD'] != 'POST' || Loader::helper('validation/token')->validate(
                    ) == false)
            ) {
                $v = new View('/frontend/maintenance_mode');
                $v->setViewTheme(VIEW_CORE_THEME);
                return $this->sendResponse($v);
            }
        }


Replace it with
$u = new user();
        if (!$u->isSuperUser()) {
      if ((!$c->isAdminArea()) && ($c->getCollectionPath() != '/login')) {
            $smm = Config::get('concrete.maintenance_mode');
            if ($smm == 1 && ($_SERVER['REQUEST_METHOD'] != 'POST' || Loader::helper('validation/token')->validate(
                    ) == false)
            ) {
                $v = new View('/frontend/maintenance_mode');
                $v->setViewTheme(VIEW_CORE_THEME);
                return $this->sendResponse($v);
            }
        }
      }
sweszler replied on at Permalink Reply
That's it!
Thank you very much andrewjaff!
andrewjaff replied on at Permalink Reply
andrewjaff
Please don't forget to mark as best answer. :)

Have Fun...