Change default Railo error template to not have HTML

Description

Any errors that happen once the bootstrap runs are handled by CommandBox's global error handler which ANSI formats the message, however, the initial call to the bootstrap is outside that level. Therefore any issues finding BootStrap.cfm or errors not handled by the onError() method display ugly HTML. Change default Lucee error template to hot have HTML in it.

Activity

Show:
Luis Majano
June 21, 2014, 11:03 PM

What's the estimate Denny.

Denny Valliant
December 26, 2014, 6:25 AM

This should be fixed in the latest. Splitting the CLI and the server contexts up made it work correctly I think. Feel free to give her a spin and verify.

Brad Wood
April 25, 2015, 4:04 AM

I'm not sure if this was fixed in Railo and regressed with Lucee or was just never fixed at all, but the default Lucee error page not only outputs HTML but doesn't even work. When I cause an unhandled CFML exception in CommandBox, this text is output. I stripped out the HTML in it just to it would be readable.

The big issue seems that it's looking for a "lucee-context" folder in the root of my C: drive. The error-cli.cfm file exists, but is in C:\Users\Brad\.CommandBox\engine\cfml\cli\cfml-web\context\templates\error

Lucee [4.5.1.008] - Error (Missinginclude)
Message Page /lucee-context/templates/error/error-cli.cfm [C:\lucee-context\templates\error\error-cli.cfm] not found
Java Stacktrace
Page /lucee-context/templates/error/error-cli.cfm [C:\lucee-context\templates\error\error-cli.cfm] not found
at lucee.runtime.PageSourceImpl.loadPage(PageSourceImpl.java:915):915
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:944):944
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:847):847
at lucee.runtime.PageContextImpl.handlePageException(PageContextImpl.java:1904):1904
at lucee.runtime.listener.ModernAppListener.onError(ModernAppListener.java:400):400
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2265):2265
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2221):2221
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:467):467
at lucee.runtime.engine.CFMLEngineImpl.cli(CFMLEngineImpl.java:768):768
at lucee.loader.engine.CFMLEngineWrapper.cli(CFMLEngineWrapper.java:267):267
at luceecli.CLIMain.run(CLIMain.java:63):63
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method):-2
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source):-1
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source):-1
at java.lang.reflect.Method.invoke(Unknown Source):-1
at cliloader.LoaderCLIMain.execute(LoaderCLIMain.java:336):336
at cliloader.LoaderCLIMain.main(LoaderCLIMain.java:269):269

Denny Valliant
April 25, 2015, 4:20 AM

It was fixed at one point. Does it work in 1.1.1? At first blush I'd lean towards a missed replacement, but it could be a regression after the fixes for the server/web context locations.

Brad Wood
April 28, 2015, 3:24 AM

I confirmed this works in CommandBox 1.1.1 so it's a regression in Lucee. Note, this is the default error template in the CLI not the embedded server. An easy way to test this is to put a typo in the Application.cfc's onApplicationStart() method and rename the onError() method. Then start CommandBox and you'll see Lucee blowing up whilst trying to find the default error template. I'll create a separate ticket for this.

Fixed

Assignee

Brad Wood

Reporter

Brad Wood

Labels

None

Affects versions

Fix versions

Priority

Major