Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2018-03-27 10:21:59

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,438
Website GitHub

Re: smd_at_work: click to put your site in maintenance mode

Kjeld wrote #310265:

when it is turned on, the publisher also gets the error message and can’t see the public site anymore… That is true for Ruud’s rvm_maintenance as well.

That is very strange. There should be no changes in core that stop either plugin working. That said, I have updated it for 4.7.0 but the changes are all internal:

  • Better class-based admin code.
  • Leave Textpack management to core.
  • Changed conditional tag to remove EvalElse().

Functionality-wise there should be no changes. So the issue you’re having with the plugins and 4.7.0 may stem from something else. The only situation you’ll see the maintenance mode message if you’re a publisher is if Txp thinks you’re “not logged in”.

Have you tried clearing your site cookies? Sometimes if they get messed up (odd domains or prefixes) then you get strange behaviour. I had that recently, where I could browse the admin-side fine but if I went to a new browser tab and typed in the domain, it’d log me out. Turned out to be a stale cookie with a double-slash in its path. Who’d have guessed.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#17 2018-03-27 11:37:24

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 465
Website

Re: smd_at_work: click to put your site in maintenance mode

Bloke wrote #310396:

That is very strange. There should be no changes in core that stop either plugin working.

Have you tried clearing your site cookies? Sometimes if they get messed up (odd domains or prefixes) then you get strange behaviour. I had that recently, where I could browse the admin-side fine but if I went to a new browser tab and typed in the domain, it’d log me out. Turned out to be a stale cookie with a double-slash in its path. Who’d have guessed.

Thanks, Bloke! I have tried clearing both the cache and the cookies, and I installed your new version. No luck so far. It still locks me out on the public side when maintenance is turned on.


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#18 2018-03-27 11:43:41

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,438
Website GitHub

Re: smd_at_work: click to put your site in maintenance mode

Strange. Works fine for me.

Do the public tags work? Look at the example in the plugin docs and see if the conditional tag works.

Also, try this in any Page template:

<txp:if_logged_in>
Textpattern thinks I'm logged in.
<txp:else />
Textpattern thinks I'm logged out.
</txp:if_logged_in>

Then visit a page on your site (with maintenance mode off of course!) that uses that Page. What do you see? Does anything change if you log out of the admin side?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#19 2018-03-27 11:51:02

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 465
Website

Re: smd_at_work: click to put your site in maintenance mode

Bloke wrote #310398:

Strange. Works fine for me.

Do the public tags work? Look at the example in the plugin docs and see if the conditional tag works.

Also, try this in any Page template:

<txp:if_logged_in>...

Then visit a page on your site (with maintenance mode off of course!) that uses that Page. What do you see? Does anything change if you log out of the admin side?

Oh, interesting. I get Textpattern thinks I'm logged out.. I’ll have a good look at some things, and see if I can find the cause for this.


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#20 2018-03-27 11:59:03

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 465
Website

Re: smd_at_work: click to put your site in maintenance mode

Figured it out, Bloke!

There were two cookies, one with www. before the [site_name] and one without. It recognized only one of them. When I logged in with www.[site_name], txp knew I was logged in, when I logged in with [site_name] (without www.), it didn’t…


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#21 2018-04-02 14:12:06

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: smd_at_work: click to put your site in maintenance mode

Stef,

I’m using. I need to be able to see what the maintenance mode looks like so I can fix it up proper visually. How can I be logged in and working but still be able to see the front-side in MM?

If I try and go to a different browser where I’m not logged in, I still see the site as if I’m logged in.

What’s the trick?

Offline

#22 2018-04-02 15:37:43

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,438
Website GitHub

Re: smd_at_work: click to put your site in maintenance mode

There’s no trick with this one.

  • Install and activate the plugin.
  • Go to the Prefs -> Maintenance mode.
  • Toggle maintenance mode on and set a suitable message. Or, if you prefer, create an error_503 Page template and that’ll be served instead.

When it’s active you’ll see a notification all the time in the admin side (bottom left of each page). Visit any other non-logged-in browser and you’ll see the maintenance message.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#23 2018-04-02 21:17:02

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: smd_at_work: click to put your site in maintenance mode

Destry wrote #310570:

If I try and go to a different browser where I’m not logged in, I still see the site as if I’m logged in. What’s the trick?

The trick is to actually SAVE the preference change after switching to mode on.

(Don’t mind me, just looking for my wits.)

Offline

#24 2018-04-03 09:05:52

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: smd_at_work: click to put your site in maintenance mode

Working great.

One suggestion, because I have to be clever in my error message… Maybe use a textarea field instead of the input, which is kind of hard to edit in.

Offline

#25 2018-04-03 09:11:34

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,438
Website GitHub

Re: smd_at_work: click to put your site in maintenance mode

Destry wrote #310580:

One suggestion, because I have to be clever in my error message… Maybe use a textarea field instead of the input, which is kind of hard to edit in.

Will do.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#26 2018-04-03 09:56:12

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,438
Website GitHub

Re: smd_at_work: click to put your site in maintenance mode

v0.40 is released

For Txp 4.7+ only, since it uses the new language designator list.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#27 2018-04-04 01:17:57

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,636
Website

Re: smd_at_work: click to put your site in maintenance mode

I am confused… In the release notes you mention that the input field was changed to a textarea, but after installing and accessing the Prefs panels, I still see an input field.

Also, tentative fr strings

#language fr
#@admin-side
smd_at_work_admin_message => Le site est en mode maintenance
#@prefs
smd_at_work => Maintenance mode
smd_at_work_enabled => Maintenance mode activée
smd_at_work_message => Message maintenance

Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#28 2018-04-04 01:19:27

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,636
Website

Re: smd_at_work: click to put your site in maintenance mode

I am confused… In the release notes you mention that the input field was changed to a textarea, but after installing and accessing the Prefs panels, I still see an input field.

Also, tentative fr strings

#language fr
#@admin-side
smd_at_work_admin_message => Le site est en mode maintenance
#@prefs
smd_at_work => Maintenance mode
smd_at_work_enabled => Mode maintenance activée
smd_at_work_message => Message maintenance

Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#29 2018-04-04 07:37:25

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,676
GitHub Twitter

Re: smd_at_work: click to put your site in maintenance mode

#language fr
#@admin-side
smd_at_work_admin_message => Le site est en mode de maintenance
#@prefs
smd_at_work => Mode de maintenance
smd_at_work_enabled => Activer le mode de maintenance ?
smd_at_work_message => Message de maintenance :

Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#30 2018-04-04 08:31:39

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,438
Website GitHub

Re: smd_at_work: click to put your site in maintenance mode

phiw13 wrote #310601:

I am confused…

The confusion is all mine. Note to self, when installing prefs, remember that Textpattern doesn’t update existing preference paraphernalia unless told.

Bug fixed in v0.41 and French Textpack included. Thank you both.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB