Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-06-28 00:23:00

NyteOwl
Member
From: Nova Scotia, Canada
Registered: 2005-09-24
Posts: 539

CSS and Error pages.

Ok, once again my apologies if this has been covered previously but I couldn’t find any answer to the specifics.

I have the following in a form which is contained in all my pages: <code><link rel=“stylesheet” href=”<txp:css />” type=“text/css” media=“screen” title=“My Style (Screen)”/></code>

This works fine except when making a custom error page.

On a normal site page this is converted on output to the browser as: <code><link rel=“stylesheet” href=“http://www.whatever.tld/textpattern/css.php?s=default” type=“text/css” media=“screen” title=“My Style (Screen)”/></code>

On the error page however it is output as: <code><link rel=“stylesheet” href=“http://www.whatever.tld/textpattern/css.php?s=” type=“text/css” media=“screen” title=“My Style (Screen)”/></code>

Note the missing “default”. The result is that the stylesheet is not applied to the error page.

The only solution I have found is to place the explicit html link for the stylesheet on the error page rather than rely on the txp:css tag to generate it.

Is this a bug? Or have I (once again) overlooked something?


Obsolescence is just a lack of imagination. / 36-bits Forever! / #include <disclaimer.h>;

Offline

#2 2006-06-28 00:49:28

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

Re: CSS and Error pages.

It’s not ideal behaviour, but expected. The <txp:css /> tag is sensitive to the current section. On an error page, everything is undefined; there is no section.

You could use <txp:css n="mystyle" />.

txp:css isn’t the only affected tag. On error pages, you’ll need to be careful about what tags you use, and test thoroughly. That’s not really a bug: error pages are used in situations when something has gone wrong, so you can’t assume everything will work normally.


Alex

Offline

#3 2006-06-28 00:56:44

NyteOwl
Member
From: Nova Scotia, Canada
Registered: 2005-09-24
Posts: 539

Re: CSS and Error pages.

Ah ok. Thanks. I can work with that. :) The error pages were the last major thing before I let <a href=“http://www.ve1cbf.ca” title=“VE1CBF – The Yak Shack”>the site</a> “loose in the wild” as it were :) It’s pretty much done expect for tweaks.

Last edited by NyteOwl (2006-06-28 01:31:51)


Obsolescence is just a lack of imagination. / 36-bits Forever! / #include <disclaimer.h>;

Offline

Board footer

Powered by FluxBB