MuchDev Posted August 24, 2014 Posted August 24, 2014 Totally loving that this module exists, I am about to push a ton of new data to a site that I am live developing and I really dont want it to get picked up by any nosey search engines. I have to say though the first thing I did to make it usable was delete the line of code that said "This site is in maintenance mode" as it was sitting right over the top of my navigation. I would say if you are going to have fixed positioning I personally would like it at the bottom, or even the ability to change the code via a field. Maybe even a custom code box or something along those lines. All in all though this module is a life saver and thank you for releasing it 1
Kay Lohn Posted January 18, 2015 Posted January 18, 2015 Hi, Wonderful module, the core should have the ability to put the site offline. Anyways, I had a slight problem with this module. Please refer to this topic/thread. Thanks. https://processwire.com/talk/topic/8822-session-redirect-problem/
eyesee Posted February 3, 2015 Posted February 3, 2015 I just extended the functionality of this great module. I had the need to still allow some pages to be accessible in active maintenance mode. I submitted a pull request in github for this module and hope it gets accepted (just learning module programming)... 1
kongondo Posted February 3, 2015 Posted February 3, 2015 @eyesee, Welcome to the forums. I am wondering if your added functionality is similar to one of these similar modules? http://modules.processwire.com/modules/page-protector/ http://modules.processwire.com/modules/protected-mode/
FrancisChung Posted November 25, 2015 Posted November 25, 2015 Could this module be extended to have an offline mode, something we can use whilst we do an upgrade or install of the site?
Robin S Posted December 20, 2015 Posted December 20, 2015 +1 for a class/ID on the "maintenance mode" badge so it's position and appearance can be overridden. Would be cool if there were controls to set the text of the badge and the native PW message. Also, site editors who are not given permission to view the site in maintenance mode are put into an infinite redirect loop if they attempt to log in.
netcarver Posted February 28, 2016 Posted February 28, 2016 @Pete, seeing some problems when visiting this module's settings page under PHP7. I had to tweak the code a little to get it working again. Here's what I did... // Now use $data and $fieldsModel loop to create all checkboxes foreach ($fieldsModel as $f=>$fM){ $creator = $fM['type']; $fields->add( self::$creator($f, $fM['label'], $data[$f], $fM['desc']) ); } 1
LostKobrakai Posted April 16, 2016 Posted April 16, 2016 It should be. I've run it on multiple 2.7 installations.
Pete Posted April 16, 2016 Author Posted April 16, 2016 And 3.x in fact - I've got it running on an installation there with no issues (auto-compiling for namespaces nicely). 2
Robin S Posted May 19, 2016 Posted May 19, 2016 When used with PHP7 I get this fatal error: Uncaught Error: Access to undeclared static property: MaintenanceMode::$fM in /home/mysite/web/test/site/modules/MaintenanceMode/MaintenanceMode.module:94 Is there an easy fix for this?
adrian Posted May 19, 2016 Posted May 19, 2016 When used with PHP7 I get this fatal error: Uncaught Error: Access to undeclared static property: MaintenanceMode::$fM in /home/mysite/web/test/site/modules/MaintenanceMode/MaintenanceMode.module:94 Is there an easy fix for this? Just add: protected static $fM; at line #19 You'll also need to change line 94 from: self::$fM['type']($f, $fM['label'], $data[$f], $fM['desc']) to: self::{$fM['type']}($f, $fM['label'], $data[$f], $fM['desc']) 7
Robin S Posted May 19, 2016 Posted May 19, 2016 Thank you, adrian. That fixes it. Just adding the curly braces around $fM['type'] was enough to avoid the error message. Before I read your reply I was doing $function = $fM['type']; $fields->add( self::$function($f, $fM['label'], $data[$f], $fM['desc']) ); which also worked. 2
Christophe Posted October 13, 2016 Posted October 13, 2016 Hello Pete, I hope you are doing well! Does this module have the ability to put a website in "maintenance mode" for an undetermined time without affecting SEO? With a 503 status code and perhaps in combination with a particular HTTP header (Retry-After), etc. Thank you in advance!
Christophe Posted October 14, 2016 Posted October 14, 2016 It's ok @Pete, it has been discussed starting at Your module is also mentioned by adrian and horst. Have a nice weekend!
Ben C Posted October 26, 2016 Posted October 26, 2016 (edited) EDIT: @adrian SOLVED MY PROBLEM I'm having an issue. My processwire login. I click configure and this happens (at the url http://freezermoosh.co.uk/opensesame/module/edit?name=MaintenanceMode) Error: Uncaught Error: Access to undeclared static property: MaintenanceMode::$fM in /var/sites/f/freezermoosh.co.uk/public_html/site/modules/Notanotherdotcom-Maintenance-Mode-a42854b/MaintenanceMode.module:94 Stack trace: #0 [internal function]: MaintenanceMode::getModuleConfigInputfields(Array) #1 /var/sites/f/freezermoosh.co.uk/public_html/wire/core/Modules.php(3509): call_user_func(Array, Array) #2 [internal function]: ProcessWire\Modules->___getModuleConfigInputfields('MaintenanceMode') #3 /var/sites/f/freezermoosh.co.uk/public_html/wire/core/Wire.php(348): call_user_func_array(Array, Array) #4 /var/sites/f/freezermoosh.co.uk/public_html/wire/core/WireHooks.php(548): ProcessWire\Wire->_callMethod('___getModuleCon...', Array) #5 /var/sites/f/freezermoosh.co.uk/public_html/wire/core/Wire.php(373): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Modules), 'getModuleConfig...', Array) #6 /var/sites/f/freezermoosh.co.uk/public_html/wire/modules/Process/ProcessModule/ProcessModule.mo (line 94 of /var/sites/f/freezermoosh.co.uk/public_html/site/modules/Notanotherdotcom-Maintenance-Mode-a42854b/MaintenanceMode.module) This error message was shown because: you are logged in as a Superuser. Error has been logged. Edited October 26, 2016 by Ben C 1
CaelanStewart Posted May 18, 2017 Posted May 18, 2017 On 2016-10-26 at 1:38 PM, Ben C said: EDIT: @adrian SOLVED MY PROBLEM I'm having an issue. My processwire login. I click configure and this happens (at the url http://freezermoosh.co.uk/opensesame/module/edit?name=MaintenanceMode) Error: Uncaught Error: Access to undeclared static property: MaintenanceMode::$fM in /var/sites/f/freezermoosh.co.uk/public_html/site/modules/Notanotherdotcom-Maintenance-Mode-a42854b/MaintenanceMode.module:94 Stack trace: #0 [internal function]: MaintenanceMode::getModuleConfigInputfields(Array) #1 /var/sites/f/freezermoosh.co.uk/public_html/wire/core/Modules.php(3509): call_user_func(Array, Array) #2 [internal function]: ProcessWire\Modules->___getModuleConfigInputfields('MaintenanceMode') #3 /var/sites/f/freezermoosh.co.uk/public_html/wire/core/Wire.php(348): call_user_func_array(Array, Array) #4 /var/sites/f/freezermoosh.co.uk/public_html/wire/core/WireHooks.php(548): ProcessWire\Wire->_callMethod('___getModuleCon...', Array) #5 /var/sites/f/freezermoosh.co.uk/public_html/wire/core/Wire.php(373): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Modules), 'getModuleConfig...', Array) #6 /var/sites/f/freezermoosh.co.uk/public_html/wire/modules/Process/ProcessModule/ProcessModule.mo (line 94 of /var/sites/f/freezermoosh.co.uk/public_html/site/modules/Notanotherdotcom-Maintenance-Mode-a42854b/MaintenanceMode.module) This error message was shown because: you are logged in as a Superuser. Error has been logged. I had the same issue, how did you fix it? EDIT: Nevermind, found it. Cheers.
Robin S Posted May 18, 2017 Posted May 18, 2017 10 hours ago, CaelanStewart said: I had the same issue, how did you fix it? EDIT: Nevermind, found it. Cheers. It helps the community if people share the solutions to their problems Could you please post back with what you found? Thanks. 2
CaelanStewart Posted May 22, 2017 Posted May 22, 2017 On 2017-5-19 at 0:12 AM, Robin S said: It helps the community if people share the solutions to their problems Could you please post back with what you found? Thanks. Yeah, Ben C was referring to a post about four or five about his. This one to be precise: On 2016-5-19 at 3:32 AM, adrian said: Just add: protected static $fM; at line #19 You'll also need to change line 94 from: self::$fM['type']($f, $fM['label'], $data[$f], $fM['desc']) to: self::{$fM['type']}($f, $fM['label'], $data[$f], $fM['desc']) 2
Mike Rockett Posted May 22, 2017 Posted May 22, 2017 On 10/26/2016 at 2:38 PM, Ben C said: I click configure and this happens (at the url http://freezermoosh.co.uk/opensesame/module/edit?name=MaintenanceMode) Lol at the admin path - opensesame! Brilliant 4
abmcr Posted January 24, 2019 Posted January 24, 2019 Php 7.2 : i have an error at line 96 Fatal Error: Uncaught Error: Access to undeclared static property: MaintenanceMode::$fM in /home/vl303ic7/envers.vda.it/site/modules/MaintenanceMode/MaintenanceMode.module:94 self::$fM['type']($f, $fM['label'], $data[$f], $fM['desc']) I am the only? Thank you Fatal Error: Uncaught ErrFatal Error: Uncaught Error: Access to undeclared static property: MaintenanceMode::$fM in /home/vl303ic7/envers.vda.it/site/modules/MaintenanceMode/MaintenanceMode.module:94or: Access to undeclared static property: MaintenanceMode::$fM in /home/vl303ic7/envers.vda.it/site/modules/MaintenanceMode/MaintenanceMode.module:94
adrian Posted January 24, 2019 Posted January 24, 2019 Just now, abmcr said: Php 7.2 : i have an error at line 96 Fatal Error: Uncaught Error: Access to undeclared static property: MaintenanceMode::$fM in /home/vl303ic7/envers.vda.it/site/modules/MaintenanceMode/MaintenanceMode.module:94 self::$fM['type']($f, $fM['label'], $data[$f], $fM['desc']) I am the only? Thank you Fatal Error: Uncaught ErrFatal Error: Uncaught Error: Access to undeclared static property: MaintenanceMode::$fM in /home/vl303ic7/envers.vda.it/site/modules/MaintenanceMode/MaintenanceMode.module:94or: Access to undeclared static property: MaintenanceMode::$fM in /home/vl303ic7/envers.vda.it/site/modules/MaintenanceMode/MaintenanceMode.module:94 You can always use the maintenance options in the Protected Mode module.
adrian Posted January 24, 2019 Posted January 24, 2019 @abmcr - I have a little more time right now, so if you want to fix this module instead, take a look at these two commits to @Pete's Email to page module: https://github.com/Notanotherdotcom/ProcessEmailToPage/commit/50acc8df55b69690c50c7aa31e439405e182d0ed https://github.com/Notanotherdotcom/ProcessEmailToPage/commit/e149fb7abf49a6bb31a4c8885051323528f5e19d He uses a similar syntax in that module to this one, so the required fixes will be the same.
abmcr Posted January 24, 2019 Posted January 24, 2019 I have refactor a little for using in php 7.2 https://github.com/abmcr/MaintenanceMode Thank you Fatal Error: Uncaught ErrFatal Error: Uncaught Error: Access to undeclared static property: MaintenanceMode::$fM in /home/vl303ic7/envers.vda.it/site/modules/MaintenanceMode/MaintenanceMode.module:94or: Access to undeclared static property: MaintenanceMode::$fM in /home/vl303ic7/envers.vda.it/site/modules/MaintenanceMode/MaintenanceMode.module:94
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