Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2005-09-06 23:25:27

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: EE style 'turn off site' function

Mary, this is what I was talking about. Well mostly, I still think an automated search would be quite useful.

But by the way, I don’t see any strings in prefs or advanced prefs related to the 404 handling (with a #891 install).

Offline

#26 2005-09-06 23:39:28

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: EE style 'turn off site' function

I’m speaking in terms of how it could be accomplished, as opposed to an already existing feature. :)

Offline

#27 2005-09-07 00:57:34

LeeStewart
Archived Plugin Author
From: Boston, MA, US
Registered: 2005-07-25
Posts: 81
Website

Re: EE style 'turn off site' function

> mary wrote:
> You add a 404 error page preference under advanced preferences,

I don’t see that, it’s available in Textpattern 4.0.1 (r888)? Am I totally blind?

[Lee]


Monkeys could have written a better post..

Offline

#28 2005-09-07 02:18:48

KurtRaschke
Plugin Author
Registered: 2004-05-16
Posts: 275

Re: EE style 'turn off site' function

LeeStewart wrote:
> mary wrote:
> You add a 404 error page preference under advanced preferences,
I don’t see that, it’s available in Textpattern 4.0.1 (r888)? Am I totally blind?
[Lee]

Quoting mary’s earlier post:

I’m speaking in terms of how it could be accomplished, as opposed to an already existing feature. :)

So it doesn’t actually exist yet.

-Kurt


kurt@kurtraschke.com

Offline

#29 2005-09-07 02:24:32

LeeStewart
Archived Plugin Author
From: Boston, MA, US
Registered: 2005-07-25
Posts: 81
Website

Re: EE style 'turn off site' function

sigh I need to pay more attention.

Looks like my plugin will be the first that uses the new 404 callback code! The next version of my plugin will have generic 404 code, the final version will redirect based on the filename…

[Lee]


Monkeys could have written a better post..

Offline

#30 2005-09-07 07:07:25

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: EE style 'turn off site' function

mary wrote:
I’m speaking in terms of how it could be accomplished, as opposed to an already existing feature. :)

Ok, so yes I was speaking about the same thing too. But with some kind of granularity, aka in Adv Prefs severals options :

  • template for 404
  • template for 403
  • template for 401
    … and so on
  • template for maintenance, or file to output

Replace “template” by page, form, or even section; depending on how it’s implemented.

Or, one can use the hardcoded name section/page/form for the job, aka a “error 404” page for example.

But I still think a pre-automated-search would be quite nice. Not many software does it right now, each and everyone of them will do it down the road – maybe one, or two year from now. Because, quite simply, it’s the easiest and more practical way of handling error for non geeks.

Offline

#31 2005-09-07 11:13:29

LeeStewart
Archived Plugin Author
From: Boston, MA, US
Registered: 2005-07-25
Posts: 81
Website

Re: EE style 'turn off site' function

Jeremie wrote:
Ok, so yes I was speaking about the same thing too. But with some kind of granularity, aka in Adv Prefs severals options :

Since Textpattern really only supports 404 conditions right now, my plugin checks for that and will redirect the user to a specified URL. I decided to do that because someone may want to send the user to something that’s not in the Textpattern system, a static HTML file or whatnot.

I feel like the “down for maintenance” mechanism should assume that the database isn’t available. If I go through the trouble of setting my site to this mode, it’s because I’m doing some serious system changes. Even if I’m just modifying some code in a form or something, I don’t want to chance having that displayed.

Jeremie also wrote:
But I still think a pre-automated-search would be quite nice.

My plugin will do that too. It’s like magic.

[Lee]


Monkeys could have written a better post..

Offline

#32 2005-09-07 12:20:43

creativesplash
Member
From: Coimbatore, India
Registered: 2005-01-19
Posts: 283
Website

Re: EE style 'turn off site' function

@Jeremie Okie. Mine was just an idea sort of. Sad it cannot be applied practically.

Thought: How do admins vew the website while it is being updated or maintained?


“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”

— Albert Einstein

Offline

#33 2005-09-08 00:56:25

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: EE style 'turn off site' function

> “But with some kind of granularity”

Exactly. I see it as the pref(s) being a dropdown list of available pages, then pick one to set it as the error/message page.

> “How do admins view the website while it is being updated or maintained?”

Check for valid user info, just like the backend does. Currently, you can’t use the cookie the admin generates. Doesn’t mean it isn’t possible though, either by setting a second cookie (if a plugin) or adjusting the current cookie (if built-in).

Offline

#34 2005-09-08 01:09:25

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: EE style 'turn off site' function

I feel like the “down for maintenance” mechanism should assume that the database isn’t available.

How do we check for the ‘down for maintenance’ preference, which is stored in the database, if the database isn’t available?


Alex

Offline

#35 2005-09-08 02:41:10

KurtRaschke
Plugin Author
Registered: 2004-05-16
Posts: 275

Re: EE style 'turn off site' function

A flag in the filesystem? TXP, if properly configured, should have somewhere to write to, so maybe it could put something there?

But then how does it pull the ‘down for maintenance’ page out of the DB to show it to the user? Or is it now a separate file (maintenance.php?).

I’m confused. I’d say that the existing ‘database unavailable’ page should do fine for that case, and a separate ‘down for maintenance’ form stored in the DB.

Of course, if a database outage and TXP downtime coincide, the viewer will see the less-informative ‘database unavailable’ message, but I’m not sure that there’s a clean solution to that.


kurt@kurtraschke.com

Offline

#36 2005-09-09 09:35:40

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: EE style 'turn off site' function

DB unavailable and site down for maintenance are two different things. The latter intend some kind of will from the webmaster, the first may be the hosting going south.

Some interesting links on how to make good 404 pages : ALA, Plinko, 404ep and 404lounge

Last edited by Jeremie (2005-09-09 09:36:29)

Offline

Board footer

Powered by FluxBB