RE: [coldbox:16586] Trouble using renderData for 404 error page

A bit of commentary on the 404-- It would be unfortunate if some transient errors on your home page caused search engines to remove your pages from their cache because they were reporting 404s.

Question: What HTML, if any, do you want returned with your 404 when an error happens?

If you don’t want to return anything, just put a cfheader and an abort in your exception handler or an onException interceptor.

If you don’t redirect in your exception handler, then ColdBox will continue on to the “Oops” error page. The way around that is to configure a customErrorTemplate setting. I would suggest doing that if you do want to return some HTML along with the 404. Of course keep in mind, any users with “friendly HTTP error message” turned on (default) will not see your HTML. Instead they’ll see whatever Internet Explorer wants them to see for a 404.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com