Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2018-04-04 08:47:11

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

Bloke wrote #310604:

The confusion is all mine.

Confusion, confusion everywhere…

Thanks, now I have a textarea.


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

Offline

#32 2018-04-04 15:23:42

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

Anyone (not necessarily Stef)…

I have forms that build the opening and closing parts of my templates. The closing part includes the footer. These “global” template forms are used on the default page, thus used on the 503_error page too (as per default behavior).

But here’s the thing. There are a couple of links in the footer that I don’t want to appear when the site is in m-mode because they point to internal locations, which won’t work in that case and showing them is just bad UX, I think.

I could easily deal with this if there was a contextual class selector (e.g. <body class="error"> that functioned in relation to the plugin, but I’m not coming up with anything for how to do that otherwise. If I add my own class, it just impacts the content whether plugin is on or off.

You see what I mean?

Any genius txp tag magic to be had here?

Offline

#33 2018-04-04 15:29:33

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 #310612:

Any genius txp tag magic to be had here?

Does the built-in plugin <txp:smd_if_at_work> conditional tag help?


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

#34 2018-04-04 17:10:07

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

Yeah… I’ve been staring at those tags for a day, but now that you call it out, I see what you mean. It’s okay as a wrapper, then, I guess?

I’ll try it.

<txp:smd_if_at_work>
show only 3 of 5 lines
<txp:else />
show all 5 lines
</txp:smd_if_at_work>

Offline

#35 2018-04-04 17:23:03

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 #310615:

It’s okay as a wrapper, then, I guess?

It only works as a wrapper. A good one. Not Kanye.

An alternative to your example:

<txp:smd_if_at_work>
    show 3 lines specific to maintenance mode
</txp:smd_if_at_work>
show remaining two lines common to both modes

Last edited by Bloke (2018-04-04 17:24:06)


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

#36 2021-06-26 11:34:19

johnno
Member
Registered: 2007-06-14
Posts: 30

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

Have just upgraded a site from 4.8.3 to 4.8.7, but the ever-useful smd_at_work appears to have gone on extended vacation :(
Just hope it hasn’t retired!

Offline

#37 2021-06-26 11:50:28

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

Hmm, have you got the latest version?


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

#38 2021-06-26 12:33:04

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

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

Interesting issue, I just ran into.

On my error page I use <txp:output_form form="styles" /> to load the styles of my site.

When I turn on smd_at_work’s Maintenance mode, the output form is not loaded. Therefore no styles…


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

#39 2021-06-26 12:45:05

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 #330724:

On my error page I use <txp:output_form form="styles" /> to load the styles of my site. When I turn on smd_at_work’s Maintenance mode, the output form is not loaded.

That’s likely going to be because of Themes rather than specific to the plugin. Recall that forms (pages/styles) are tied to a theme. Until one of the recent versions (4.8.4 or 4.8.5?) where we found an issue with loading forms, the theme context was lost on error pages so it didn’t know where to find the forms.

Are you running Txp 4.8.7? It should work fine on that.


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

#40 2021-06-26 12:52:27

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 #330725:

That’s likely going to be because of Themes rather than specific to the plugin. Recall that forms (pages/styles) are tied to a theme. Until one of the recent versions (4.8.4 or 4.8.5?) where we found an issue with loading forms, the theme context was lost on error pages so it didn’t know where to find the forms.

Are you running Txp 4.8.7? It should work fine on that.

That explains it. I am running 4.8.4.

I will upgrade tomorrow.

Thanks, Bloke!


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

#41 2021-06-27 04:22:45

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

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

Thanks again for the assistance with smd_at_work yesterday, Bloke.

The styles are now loaded.

I have one question:

When maintenance mode is switched on, I also get to see a 503 error status on the public side when I am logged into the admin side.

Is that the way it is supposed to be?


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

#42 2021-06-27 05:52:46

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

Kjeld wrote #330738:

When maintenance mode is switched on, I also get to see a 503 error status on the public side when I am logged into the admin side.

Is that the way it is supposed to be?

You see the error page (on the public side) in the same browser as the one you are logged in ? That is weird. I can see the public side of the site just fine.


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

Offline

#43 2021-06-27 09:24:14

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

Nope. That’s not right, as phiw13 says. Are you using Safari in incognito mode, or something like that? Browsers sometimes don’t share credentials across tabs.


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

#44 2021-06-27 10:25:59

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 #330745:

Nope. That’s not right, as phiw13 says. Are you using Safari in incognito mode, or something like that? Browsers sometimes don’t share credentials across tabs.

I am not using a Private Window in Safari, and am logged in as admin (displayed as ‘publisher’).


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

#45 2021-06-27 11:22:35

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

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

Just logged in on Google Chrome. Same problem…


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

Board footer

Powered by FluxBB