Jump to content

Recommended Posts

Posted

@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?

Posted
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 ?

  • 2 months later...
Posted

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?

 

Posted

@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'])
			);
		}

 

  • Like 3
  • 1 month later...
Posted

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);
		}

 

  • 3 months later...
Posted

@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

  • 2 weeks later...
Posted
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.

  • Like 1
  • 1 year later...
Posted

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?

  • 5 years later...
Posted

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).

Posted

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.

 

  • Like 2
Posted
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?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...