Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2007-04-07 19:26:24
- wii
- Member
- Registered: 2005-05-08
- Posts: 77
Errorpages in Textpattern ?
Accidentally I deleted the errorpage template in my textpattern installation, how do I get it back ?
My old site had for example links looking like this:
www.mysite.com/contact/
The new site looks like this now powered by textpattern:
www.mysite.com/contact
When viewing the page with the / it looks very strange, how do I avoid this ? Or do I just have to wait for searchengines to scan my pages again ?
Willy
Offline
#2 2007-04-07 19:32:32
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Errorpages in Textpattern ?
wii wrote:
Accidentally I deleted the errorpage template in my textpattern installation, how do I get it back ?
When viewing the page with the / it looks very strange,
What exactly do you mean with “it looks very strange”?
Offline
#3 2007-04-07 19:43:06
- wii
- Member
- Registered: 2005-05-08
- Posts: 77
Re: Errorpages in Textpattern ?
Well, can I mail you with the link ? Let me say that unlike textpattern.com, my site doesn´t show pages correctly if I add a / at the end. Textpattern.com has no problems, example:
http://www.textpattern.com/faq
http://www.textpattern.com/faq/
Offline
#4 2007-04-07 20:03:56
- wii
- Member
- Registered: 2005-05-08
- Posts: 77
Re: Errorpages in Textpattern ?
Got it, had to edit all my links, so they start with / – no problem.
Offline
#5 2007-04-07 20:05:03
- wii
- Member
- Registered: 2005-05-08
- Posts: 77
Re: Errorpages in Textpattern ?
It would be nice though with an errorpage so that people can´t see pages that are broken.
Offline
Re: Errorpages in Textpattern ?
Then recreate your error_default page. Keep in mind that you don’t have to use the exact code in error_default – you can display a plain text message if you want. If you want specific error pages that change for HTTP status codes, then create pages named error_404, error_500, etc.
Offline
#7 2007-04-07 22:13:44
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Errorpages in Textpattern ?
Keep in mind that you don’t have to use the exact code in error_default – you can display a plain text message if you want.
You just cannot remove the error_message tag, as several internal mechanisms depend upon that being in error_default. error_404 is the page he wants (which can have anything he wants in it).
Offline
Re: Errorpages in Textpattern ?
Mary wrote:
You just cannot remove the error_message tag, as several internal mechanisms depend upon that being in
error_default.
To be more specific: Textpattern can and will output different kinds of errors depending on context, it can be a 404 (Not found), a 503 (not available), a 401 (not authorized), 412 (precondition failed) etc. If you remove the tag, then the visitor (and you) will always see a plain old 404 message. This makes debugging certain problems really hard – because you might be thinking that the url is somehow wrong or not working, whereas in reality it should display a 412 condition because the comment failed due to it being detected as spam, for example.
So, either use different pages for different errors (error_404, error_412 etc.) and keep the error_default gneric with the tag in it. Or use if_status to make a conditional output depending on the status code.
Offline
#9 2007-04-08 20:41:37
- wii
- Member
- Registered: 2005-05-08
- Posts: 77
Re: Errorpages in Textpattern ?
Actually my problem is more specific.
Before Textpattern I hardcoded my site, so I would have a link called:
www.mysite.dk/events/copenhagen2006/
Now using Textpattern this page is called:
www.mysite.dk/concert-in-copenhagen-denmark-may-2006
Which is fine, but before Google changes the links to my site lots of people will come in using the old links, and they don´t get an error page (even with error_default page enabled), the get the events section where this article is located. Other pages are much a bigger problem, where Textpattern will show all the articles on page of an entire section.
I have no idea how to prevent this, I would like Textpattern to only be able to show the articles I have created, not the sections or anything else, and if someone does come in the old (wrong) way, the should get an error message from the error_default page.
Thanks
Offline
#10 2007-04-08 22:33:28
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Errorpages in Textpattern ?
Now using Textpattern this page is called… get the events section where this article is located.
If this is an article, then the correct url would be www.mysite.dk/events/concert-in-copenhagen-denmark-may-2006
I think you may also be experiencing a clean urls problem.
Offline
#11 2007-04-09 06:16:10
- wii
- Member
- Registered: 2005-05-08
- Posts: 77
Re: Errorpages in Textpattern ?
I chose just to have the title in the URL.
I will check with my host about the clean urls.
Thanks
Offline
Pages: 1