404 instead of Smarty error

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
thejimp

404 instead of Smarty error

Post by thejimp »

I'm using mod_rewrite to clean up my URLs. Does anyone have a method to get bad page requests to go to a 404 instead of this:

Warning: Smarty error: unable to read resource: "db:PAGETHATDOESN'TEXIST" in /YOURCMSROOT/lib/smarty/Smarty.class.php on line 1088

thanks,
jimp
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: 404 instead of Smarty error

Post by Ted »

Strange, you should be getting a fake 404 error when that happens, unless debug is turned on in config.php.

Try setting a custom 404 page in your Global Settings and see if that helps.
thejimp

Re: 404 instead of Smarty error

Post by thejimp »

Since I'm translating ###.html requests into index.php?page=###, all page requests are going through the CMS. I can enable the CMS error page, but I'd like to do a true 404 if the file doesn't exist. Can I send a 404 in the header for that particular Smarty error?

thanks,
jimp
wiseleo

Re: 404 instead of Smarty error

Post by wiseleo »

Yep I got same issue.

On my 404 page I use the {sitemap} tag. 0.11-b3 btw.

Sounds like the included htaccess.txt needs to be modified to specify a custom error doc at that point and to point to a custom error page, such as 404.html
Locked

Return to “CMSMS Core”