Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2016-10-14 05:08:10

mrdale
Moderator
From: Walla Walla
Registered: 2004-11-19
Posts: 2,202
Website

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

So, this is not a bug but rather a feature not yet added.

I was using attempting to use adi_gps to extract urlvars into txp_variables on a 301 page that gets redirected to by this fine plugin.

Dumbfounded by my neanderthal inability to extract and manipulate variables on that page, I eventually realized that the urlvas did not survive their redirect journey.

Is the idea of passing urlvars through the smd_at_work wormhole even possible? what would happen? would they turn into some form of outrageously elongated pasta?

Offline

#12 2016-10-14 08:02:36

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,629
Website

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

mrdale wrote #302167:

on a 301 page that gets redirected to by this fine plugin.

How did you get the plugin to throw a 301? It’s supposed to only throw 503s. The only way to throw custom responses is to intercept the txp_die callback at the moment.

That said, if I exposed a pref that allows you to specify which status code to throw — default 503 — I could repurpose the message field to be a destination URL (or add a new pref or something). The destination URL pref would only work with statuses (status? stati?) 301, 302, 303, 307 though. That any use to ya?


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

Txp Builders – finely-crafted code, design and Txp

Offline

#13 2016-10-14 14:39:42

mrdale
Moderator
From: Walla Walla
Registered: 2004-11-19
Posts: 2,202
Website

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

Bloke wrote #302168:

How did you get the plugin to throw a 301? It’s supposed to only throw 503s. The only way to throw custom responses is to intercept the txp_die callback at the moment.

That said, if I exposed a pref that allows you to specify which status code to throw — default 503 — I could repurpose the message field to be a destination URL (or add a new pref or something). The destination URL pref would only work with statuses (status? stati?) 301, 302, 303, 307 though. That any use to ya?

Sorry, you are correct sir. standard operation with a 503 page… would not pick up urlvars. you can forget all that other faff if you like.

Offline

#14 2017-03-27 22:40:48

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,629
Website

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

Version 0.22 released that fixes the location of the admin-side maintenance message so it doesn’t clash so badly with other furniture in themes.


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

Txp Builders – finely-crafted code, design and Txp

Offline

#15 2018-03-23 12:01:11

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

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

Hi Bloke, just tried this plugin with txp v4.7.0-dev.

It works, but 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.

Last edited by Kjeld (2018-03-26 22:31:40)


JapaneseStreets.com – Japanese street fashion (mostly txp)
Old Photos of Japan – Japan between 1860 and 1940 (100% txp)
MeijiShowa – Stock photos of Japan between 1860 and 1940 (100% txp)

Offline

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,629
Website

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.

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: 216
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.


JapaneseStreets.com – Japanese street fashion (mostly txp)
Old Photos of Japan – Japan between 1860 and 1940 (100% txp)
MeijiShowa – Stock photos of Japan between 1860 and 1940 (100% txp)

Offline

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,629
Website

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.

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: 216
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.


JapaneseStreets.com – Japanese street fashion (mostly txp)
Old Photos of Japan – Japan between 1860 and 1940 (100% txp)
MeijiShowa – Stock photos of Japan between 1860 and 1940 (100% txp)

Offline

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

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 216
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…


JapaneseStreets.com – Japanese street fashion (mostly txp)
Old Photos of Japan – Japan between 1860 and 1940 (100% txp)
MeijiShowa – Stock photos of Japan between 1860 and 1940 (100% txp)

Offline

Board footer

Powered by FluxBB