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?
http://www.concrete5.org/documentation/how-tos/administrators-maint...
Can anyone help me and explain why administrators can't view and edit page?
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.
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.
You could use this free add-on to do so:
https://www.concrete5.org/marketplace/addons/under-construction...
https://www.concrete5.org/marketplace/addons/under-construction...
Hi,
First open:
You will see
Replace it with
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); } } }
That's it!
Thank you very much andrewjaff!
Thank you very much andrewjaff!
Please don't forget to mark as best answer. :)
Have Fun...
Have Fun...
I hope it will help you.
http://www.concrete5.org/documentation/how-tos/developers/administr...
Thanks
Andrew