V9 maintenance mode does nothing

Core Version - 9.2.0a3
Version Installed - 9.2.0a3
Database Version - 20221219220600

Maintenance mode OFF in dashboard

mysqldump --skip-opt -ux -px database > BEF

Maintenance mode ON in dashboard

mysqldump --skip-opt -ux -px database > AFT

diff BEF AFT
34728c34728
< -- Dump completed on 2023-04-01 14:00:09
---
> -- Dump completed on 2023-04-01 14:00:22

The “Maintenance Mode” state is not saved in the database.

It’s stored in the application/config/generated_overrides/concrete.php file (the full configuration key is concrete.maintenance_mode).

Ahh! Well, that certainly explains why I see nothing in the database. However, it still does nothing :confused: I turn it in, and I can still navigate to the home page no problem. I thought that this might be because I was logged in as admin, so I logged out, and when I go to the home page when maint is on, I get

Error
Call to undefined method Concrete\Core\View\View::isEditingDisabled()

Maybe someone has some ideas as to why this is happening or why I can see my page in ADMIN mode with maint on, but in the meantime, I just created an index.php that looks like this:

<?php
if (file_exists("maint.html")) {
    echo file_get_contents("maint.html");
} else {
    require 'concrete/dispatcher.php';
}

currently running

Core Version - 9.2.0a3
Version Installed - 9.2.0a3
Database Version - 20221219220600
Error
Call to undefined method Concrete\Core\View\View::isEditingDisabled()

This is a known issue that has already been fixed by Fix #11283 · concretecms/concretecms@61e7795 · GitHub (it will be included in the next release candidate)

I can still navigate to the home page no problem

Yep, the superuser can always view the website even if it’s in maintenance mode.

All the users that have the view_in_maintenance_mode attribute key set can see the website too (by default, the members of the Administrators group have this attribute set).

1 Like

PS: the “View Site in Maintenance Mode” key can be configured in the System & Settings > Permissions & Access > Task Permissions dashboard page.