adrian Posted January 24, 2019 Share 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? Link to comment Share on other sites More sharing options...
abmcr Posted January 24, 2019 Share Posted January 24, 2019 On 1/24/2019 at 5:46 PM, 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. Expand Yes: @Pete after you grab my github, i delete ? For 503 i have no time now for implement ? Link to comment Share on other sites More sharing options...
Erik Posted March 28, 2019 Share 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? Link to comment Share on other sites More sharing options...
adrian Posted March 28, 2019 Share 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 Link to comment Share on other sites More sharing options...
Autofahrn Posted April 3, 2019 Share 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 Link to comment Share on other sites More sharing options...
eelkenet Posted May 17, 2019 Share 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); } Link to comment Share on other sites More sharing options...
antpre Posted August 24, 2019 Share 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 Link to comment Share on other sites More sharing options...
adrian Posted September 2, 2019 Share Posted September 2, 2019 On 8/24/2019 at 9: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 Expand Not currently, but it could be a simple addition. 1 Link to comment Share on other sites More sharing options...
Erik Posted January 21, 2021 Share 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? Link to comment Share on other sites More sharing options...
adrian Posted January 21, 2021 Share 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 Link to comment Share on other sites More sharing options...
Erik Posted January 22, 2021 Share Posted January 22, 2021 Thank you for the tip. Link to comment Share on other sites More sharing options...
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