Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-11-17 11:57:49

tom1
Member
Registered: 2009-03-20
Posts: 36

loading error_default page

I just noticed that my ‘error_default’ page gets loaded everytime, even if section being loaded dosent ask for that anywhere? Anybody can tell why this is happening, and is there a way to optimize query so it wouldnt load it if its not needed?

Offline

#2 2012-11-17 12:59:07

tom1
Member
Registered: 2009-03-20
Posts: 36

Re: loading error_default page

alternatively, if theres a callback where i can plugin my when error page is loaded ( section / article not found ), i could get around this problem :)

Offline

#3 2012-11-17 13:24:03

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: loading error_default page

Have you double checked which page templates are being set to load for each section in the Sections tab?

Offline

#4 2012-11-17 13:32:23

tom1
Member
Registered: 2009-03-20
Posts: 36

Re: loading error_default page

yes i have. I have 2 sections that both use only ‘default’ page template.

I came across this as i have a php script ( mail() to be precise ), on error_default template. My goal is quite obvious, i want to have email everytime user finds a 404 page.
Anyways, i tested it out a bit, and noticed that if i call die() before the mail script, it wont trigger it when opening sections normally. Of course this will kill textpattern() when trying to open error_default template, because it kills whole php procedure.

Offline

Board footer

Powered by FluxBB