StackOverflow error rendering view

Ran into this today:

When calling renderLayout with an explicit view the renderer plugin
stashes that view in instance.explicitView. I believe this is so that
you may do a simple renderView() inside your layout and it will retain
the view you passed into renderLayout.

The problem occurs when you call renderView( view="a/view/path" )
inside that explicit view. The view you pass into the second
renderView will still be overwritten with the explict view resulting
in an infinite loop.

.brett

Ahh interesting. Maybe check if view is explicit then.

Yep, don't use the renderLayout explicit if renderView has it passed
in. But I also think that it should clear the instance.explicitView
after it uses it for the renderView so it doesn't linger on. My quick
fix was to change system/plugins/Renderer.cfc:107 to:

if( len(instance.explicitView) ){ arguments.view =
instance.explicitView; setExplicitView("");}

fixed

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Awesome thanks. Any reason not to clear the explicit view after it
was used?

It looks like right now this would happen:

event.setView("event/view");

renderLayout(view="my/view"); =>renders explicit view

renderLayout(); => still renders explicit view rather than event's
CurrentView as I would aspect.

can you send a pull request?

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Sent. Thanks Luis.

Brett,

You should have known what his response was going to be :slight_smile:

Hope all is well my friend,
Curt

lol, true.

All is well, hope the same with you guys.

Cheers,

.brett