adrian Posted January 24, 2019 Posted January 24, 2019 @abmcr - great that you've fixed it up, but I think it would be helpful to submit a PR to @Pete so that everyone will get this new version. Please note that this module doesn't currently send proper 503 maintenance mode headers which is why I always use the protected mode module for this. Perhaps you could take care of adding the 503 stuff to this module as well?
abmcr Posted January 24, 2019 Posted January 24, 2019 3 minutes ago, adrian said: @abmcr - great that you've fixed it up, but I think it would be helpful to submit a PR to @Pete so that everyone will get this new version. Yes: @Pete after you grab my github, i delete ? For 503 i have no time now for implement ?
Erik Posted March 28, 2019 Posted March 28, 2019 I installed this module in version 3.0.123 but i gives me a error: Fatal Error: Uncaught Error: Access to undeclared static property: MaintenanceMode::$fM in /xxx/xxx/xxx/public_html/site/modules/MaintenanceMode/MaintenanceMode.module:94 Stack trace: #0 [internal function]: MaintenanceMode::getModuleConfigInputfields(Array)#1 /home/xxxxk/domains/xxxxx.nl/public_html/wire/core/Modules.php(3885): call_user_func(Array, Array)#2 /home/xxxxk/domains/xxxxx.nl/public_html/wire/core/Wire.php(386): ProcessWire\Modules->___getModuleConfigInputfields('MaintenanceMode', Object(ProcessWire\InputfieldForm))#3 /home/xxxxk/domains/xxxxx.nl/public_html/wire/core/WireHooks.php(723): ProcessWire\Wire->_callMethod('___getModuleCon...', Array)#4 /home/xxxxk/domains/xxxxx.nl/public_html/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Modules), 'getModuleConfig...', Array)#5 /home/xxxxk/domains/xxxxx.nl/public_html/wire/modules/Process/ProcessModule/ProcessModule.module(1255): ProcessWire\Wire->__call('getMo (line 94 of /home/devhk/domains/hk2.witxl.nl/public_html/site/modules/MaintenanceMode/MaintenanceMode.module) What is wrong?
adrian Posted March 28, 2019 Posted March 28, 2019 @Erik - I shouldn't speak for Pete, but I don't think this is being maintained at the moment. The error is related to PHP 7. Not meaning to self promote, but http://modules.processwire.com/modules/protected-mode/ has a maintenance option which throw proper 503 maintenance headers if selected in the settings. 1
Autofahrn Posted April 3, 2019 Posted April 3, 2019 @Pete, @Erik, seems to work with a tiny modification in the foreach loop (loading an intermediate variable with $fM['type']): // Now use $data and $fieldsModel loop to create all checkboxes foreach ($fieldsModel as $f=>$fM){ $fmType = $fM['type']; $fields->add( self::$fmType($f, $fM['label'], $data[$f], $fM['desc']) ); } 3
eelkenet Posted May 17, 2019 Posted May 17, 2019 An editor wanted to be able to preview the 'alternative page' we use during maintenance, but whenever he would try to view it he would be redirected to the homepage. So to me it makes sense that anyone who is allowed to bypass the maintenance page during maintenance, should also be able to preview the alternative page. Luckily, this is just a tiny code adjustment. Replace line 133-136 with: // Else if we're not in maintenance mode and we're not an administrator (and our role isn't in the list of allowed roles to access the site in maintenance mode), make sure the maintenance page redirects to the homepage } elseif (!$this->inMaintenance && $this->showPage && ($page->id == $this->showPage) && !$user->isSuperuser() && !array_intersect(explode('|', $user->roles), $this->bypassRoles)) { $this->session->redirect($this->config->urls->root, false); }
antpre Posted August 24, 2019 Posted August 24, 2019 @Adrian, thanks for you suggestion. But I need the redirect option found on the maintenance mode module. In my understanding this is not an option that your module provides ? Am I rigth ? Thanks
adrian Posted September 2, 2019 Posted September 2, 2019 On 8/24/2019 at 2:47 PM, antpre said: @Adrian, thanks for you suggestion. But I need the redirect option found on the maintenance mode module. In my understanding this is not an option that your module provides ? Am I rigth ? Thanks Not currently, but it could be a simple addition. 1
Erik Posted January 21, 2021 Posted January 21, 2021 When I install the module MaintenanceMode then I get this error message: Breaking news… Fatal Error: Uncaught Error: Access to undeclared static property: MaintenanceMode::$fM in site/modules/MaintenanceMode/MaintenanceMode.module:94 #0 [internal function]: MaintenanceMode::getModuleConfigInputfields(Array) #1 wire/core/Modules.php (3903): call_user_func(Array, Array) #2 wire/core/Wire.php (400): Modules->___getModuleConfigInputfields('MaintenanceMode', Object(InputfieldForm)) #3 wire/core/WireHooks.php (823): Wire->_callMethod('___getModuleCon...', Array) #4 wire/core/Wire.php (465): WireHooks->runHooks(Object(Modules), 'getModuleConfig...', Array) #5 wire/modules/Process/ProcessModule/ProcessModule.module (1349): P (line 94 of site/modules/MaintenanceMode/MaintenanceMode.module) What can I do?
adrian Posted January 21, 2021 Posted January 21, 2021 @Erik - it doesn't look like @Pete is maintaining this module anymore. Give https://processwire.com/modules/protected-mode/ a go - it also has the advantage of optionally sending proper 503 headers when you're using it for blocking access during maintenance downtime. 3
Pete Posted February 6 Author Posted February 6 Sorry all - I did run into a need to use this again myself today so fixed the main issue I encountered around the $fM code on line 94 and ran through the issues reported and closed out/actioned as appropriate. The frontend warning message is now toggleable, the module works fine on modern PW versions and PHP 8 versions I believe. The backend warning has been replaced to use ProcessWire's warning notifications (same issue report that suggested higher z-index and making frontend warning toggleable).
Pete Posted February 6 Author Posted February 6 Also added a check for ProCache so if maintenance mode is enabled and it detects ProCache is installed and enabled then the warning also tells the user to turn off ProCache - warning only visible in the admin. Also made strings translatable for the warning messages. I've not checked through this topic sorry for other suggestions but can do if I get time and there are still important things to look at just I needed a few quick fixes for myself for now (selfish I know). I will check out the other suggested module I saw too. @ryan perhaps we need a way to mark modules in the database as abandoned or as having issues? Because this one of mine hadn't been touched in a decade and wasn't working and made me feel bad as a result because people were trying to use it and the way my brain works (or rather doesn't) I must have seen issue reports coming in via Github but then got distracted so didn't realise there were that many when I checked. Perhaps we could have a system where folks with a certain reputation can mark a module on the site here as having issues so they get looked at/removed just not sure if anyone would volunteer for that. 2
szabesz Posted Sunday at 06:23 PM Posted Sunday at 06:23 PM On 2/6/2026 at 11:59 AM, Pete said: perhaps we need a way to mark modules in the database as abandoned or as having issues? Same comments with like/dislike just like for processwire.com blogposts, perhaps?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now