• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue WordPress Toolkit Maintenance Mode problems since update from 17.5 -> 17.8

gbotica

Regular Pleskian
Hi everyone,

Since updating one of my servers to Plesk Onyx 17.8 (Version 17.8.11 Update #27, to be exact) I find the WP Toolkit Maintenance mode to be kinda broken.

Previously, the maintenance page had a default message:

The website is undergoing scheduled maintenance.
Sorry for the inconvenience. Come back a bit later, we will be ready soon!'
I can't actually recall where this default message was set in 17.5, but it worked fine, because users could just activate maintenance mode and the "default" set up worked well. I have modified the maintenance mode template a bit, but I've downloaded the latest version of WP Toolkit and checked it with a diff tool to ensure that all the required template code is in place (in fact, I've even tried completely removing the toolkit extension and then re-installing)

Now, on 17.8, if I go to a site which had maintenance mode activated prior to 17.8, and then I Preview Maintenance Mode, the page opens with "Undefined" in the two header text fields. I also note that the on / off for the timer is ignored when using the preview, i.e. the timer elements are on the page regardless, with "0:0:0:0".

So, then I go into the Maintenance Mode set up and click "Restore Default". Then, when previewing, the two header text fields are now empty (no more "Undefined").

If I then actually activate the Maintenance Mode, the Timer setting is effective, so that is not included, but still the two text fields are empty. So, the "default" appearance of the Maintenance page is just a blank page -- not very useful. It also seems like a bug that the setting for Countdown Timer is ignored in the preview.

Of course, I can add header text in the "Screen Text" on the Maintenance Mode settings page, but that will require that each user goes and adds content there. Surely, if those fields are blank, there should be some default message, like in 17.5.

I do hope that makes some sense?

So, my question is: is it possible to set a default message for "Text block 1" and "Text block 2"? I would have thought that this was stored in the psa database somewhere?

If I have to, I could modify the the template.phtml and use some PHP conditional statement to display a default message, is $texts is not set, but I wouldn't have thought that would be necessary.

Thanks in advance for any help you might offer.
 
Update...

I've gone ahead an implemented some conditional PHP in the template.phtml file at '/usr/local/psa/var/modules/wp-toolkit/maintenance', and this works well, except...

... every site that has /wp-content/maintenance/ and /wp-content/maintenance.php in place from previously will get the broken version of the maintenance page (with the "undefined" text), until the "Restore Default" is clicked in the Maintenance Mode set up page.

Is there some way to force a "Restore Default" for all sites on the server, via CLI or something? Or, perhaps I need to use 'rm' to delete any existing maintenance template files under /var/www/vhosts?
 
Back
Top