event.noLayout() not taking effect in interceptor

I recently upgraded from ColdBox 3.8 to 4.0 and have an interceptor that was previously working, but isn’t functioning correctly now.

The interceptor executes because I can see the dump and abort that I add, but then when I remove it the interceptor still executes, but event.noLayout() has no effect; the layout renders.

I have tried this on defined views and on implicit views, but the layout renders no matter what.

The method is:

any function preRender(event,interceptData){

event.noLayout();

}

This works and I can see the dump:

any function preRender(event,interceptData){

writeDump(‘I see this’);abort;
event.noLayout();

}

I can put event.noLayout() in the action and the layout doesn’t render, but when it’s only in the interceptor it doesn’t.

Any ideas? Thanks!

I would be likely to say that it is being overwritten when the RequestContext is actual run. Maybe try the postRender and see if it makes a difference.

It has to be prelayout. Like Brad said. That’s too late.

Yeah I was looking at the links Brad, posted and realised that. Got side tracked with something else.