Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-12-08 16:36:00

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

r2721 - default style for error page

It would seem that this revision will cause a problem if there is no style called “default”.

Assuming that the “default” section uses a new style the “default” style sheet can be deleted.

This new revision seems to over-ride the <txp:css format="link" /> tag and instead inserts the following:-

<link rel="stylesheet" type="text/css" media="screen" href="http://site-url/textpattern/css.php?n=default" />

If there is no style called “default” this results in an unstyled page.

Last edited by thebombsite (2007-12-08 16:38:26)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#2 2007-12-08 16:37:46

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: r2721 - default style for error page

This doesn’t change behaviour, only now the default_error template explicitly shows that the ‘default’ style is used, which is better, because the user now sees more easily that he/she should not remove the default style.

Offline

#3 2007-12-08 16:43:50

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: r2721 - default style for error page

Well this hasn’t happened before. The error_page has always respected the <txp:css format="link" /> tag in my DTD form but on my latest port at thebombsite you can see that it is not picking up the appropriate style sheet that the site should be using.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#4 2007-12-08 16:46:47

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: r2721 - default style for error page

Hmm. looks like I spoke too soon. Before, it used the style for the section the error occurred in. Now it uses the default style. Using the default style makes more sense to me, because no matter what section the error occurs in, the template used to create the error page is the same.

Offline

#5 2007-12-08 16:50:31

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: r2721 - default style for error page

I agree that it should use the default style but what is happening is that it is looking for a style called “default” which may well not exist. Maybe it should use the style used by the “default” section which should always exist?

Last edited by thebombsite (2007-12-08 16:54:28)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#6 2007-12-08 17:58:36

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: r2721 - default style for error page

Perhaps it’s better to make it impossible to delete the ‘default’ style. Changeset 2721 applies mainly to new installs (assuming that most people have upgraded beyond 4.0.2 by now).

Offline

#7 2007-12-08 20:36:06

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: r2721 - default style for error page

Well r2717 introduced a safeguard against deleting page templates/css sheets that are used by articles, which is fine because if they are being used then you need them however, if you now say that the default style sheet can NEVER be deleted even though it is not required for the site you are imposing something that some might not want. I know there are some people out there who simply don’t like the name “default” for a style sheet. I’m not one of them I should add.

What about my suggestion that the error_default picks up the style sheet selected for the default section? Is that not possible?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#8 2007-12-08 20:42:00

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: r2721 - default style for error page

It’s not possible. (it is, but the cure would be worse than the disease in this situation).
People who remove the ‘default’ style sheet will just have to update the <txp:css> tag in the error_default template… which is true for any style sheet you delete which isn’t set as the style for a section, because scanning the contents of templates and forms to safeguard against this is too inefficient.

Offline

#9 2007-12-08 20:47:42

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: r2721 - default style for error page

Looks like we’re stuck with the “default” style sheet then. Not that it bothers me personally. I wouldn’t have spotted it if it weren’t for the fact that I was doing a port on vanilla. My main sites use “default”.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#10 2007-12-08 20:54:41

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: r2721 - default style for error page

Oh. One question. Does this only apply to the error_default template or will it apply for errors that use their own template, for example I have error_404 and error_403 templates?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#11 2007-12-08 21:15:18

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: r2721 - default style for error page

Only the error_default template, and only when doing a fresh TXP 4.0.6 install or upgrade from TXP versions older than 4.0.2.

Offline

#12 2007-12-09 00:38:03

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: r2721 - default style for error page

Which is why it happens on my vanilla site as I always do a fresh install for each new port (that’s why I call it vanilla). Thanks for the info Ruud.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

Board footer

Powered by FluxBB