[ColdBox SEEK 3.5.0 RC1 - Jeremiah 29:13] - Issue with Renderer?

Hi folks,

I recently did an upgrade to 3.5 and am running into an issue with the Renderer plugin. I am setting content to be displayed in a email like so:

local.plainview = getPlugin(‘Renderer’).renderLayout(layout=“myapp/Layout.Plain.Email”,view="#rc.mailView#");

and I get the following error when it hits this code:

Error Type: MissingInclude : [N/A]

Error Messages: Could not find the included template //views/myapp/Layout.Plain.Email.cfm.cfm.

Notice how there is two .cfm extensions?

Also, the Layout.Plain.Email.cfm file is located in my layoutsExternalLocation, i.e:

//coldbox config

viewsExternalLocation = “/myapp/common/views”,
layoutsExternalLocation = “/myapp/common/layouts”,

Any ideas why the extra .cfm is being added? And more importantly any idea why the renderer is trying to look in the view directory as opposed to the layout directory? This code worked fine in 3.1.

Thanks!

Nolan

Dang no clue

Ok too short of an answer. :slight_smile:

I use this a lot but don’t have your issues

Hi Luis,

I looked into this again when attempting another upgrade (to 3.5.1) and this is what I found…

I have this line of code in a function which is blowing the error:

local.plainview = getPlugin(‘Renderer’).renderLayout(layout=“myapp/Layout.Plain.Email”,view=“emails/user_create”);

Line 449 (of RenderLayout) has the following call which is passing the layout name as the first argument. Nowhere is the name of the view argument passed to the renderViewComposite function

<cfset iData.renderedLayout = renderViewComposite(cbox_currentLayout, viewLocations.viewPath, viewLocations.viewHelperPath, args) />

If I change it to the following it works…

<cfset iData.renderedLayout = renderViewComposite(arguments.view, viewLocations.viewPath, viewLocations.viewHelperPath, args) />

Is that a bug?

Thanks.

N

Nolan,

not really, as you can see from line 392

<cfif len(trim(arguments.view)) AND arguments.view neq instance.explicitView>
<cfreturn getPlugin(“Renderer”).setExplicitView(arguments.view).renderLayout(argumentCollection=arguments)>

The passed view is rendered as an explicit rendered view.

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

Okay, I don’t get it then. How can my renderlayout calls in 3.1 all go from working to not working. It’s clear when I log/dump the arguments in the calls that it’s passing an incorrect name (the layout name) as the view to be rendered. I’m using renderlayout in a bunch of places and these calls don’t work in 3.5. I don’t understand.

Nolan Dubeau

Load .,8,1

Nolan can you send us a case test, just a small app to reproduce please

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

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano

Okay. will do.

thanks.

Nolan

Hi Luis,

I just sent the test app to your Ortus email address.

Thanks.

Nolan