[coldbox-4.3.0-BE] Could not find the included template //views/...

27 views
Skip to first unread message

Michael Casey

unread,
Aug 1, 2017, 4:16:16 PM8/1/17
to ColdBox Platform
So, I am first-time deploying a newly built app from my DEV server to a PROD environment.

Mostly all is working okay, but in one section, when I call the handler function, and it calls the view template <cfset event.setView("Persons/persons")> I get the following error:

"Could not find the included template //views/Persons/persons.cfm"

Note the double leading slash (!)

This doesn't happen on my DEV server and all my other sections on PROD are working fine, using parallel coding, eg <cfset event.setView("Organisations/organisations")>

Does anyone know what might be causing this?

br...@bradwood.com

unread,
Aug 1, 2017, 4:46:19 PM8/1/17
to col...@googlegroups.com
Are you by chance setting your app mapping to a forward slash or something?  This sort of thing can happen when you have your app in a subfolder in development, but it's in the root of the site on production and you had code to the tune of 
"/" & variableThatIsNotEmptyNowButWillBeEmptyStringOnProd & "/path/etc"

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: br...@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com 
 
 
--------- Original Message ---------
--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/48dd3766-d00c-47c0-8b45-cd324a916e31%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Casey

unread,
Aug 1, 2017, 4:56:55 PM8/1/17
to ColdBox Platform
Hi Brad

Indeed, on DEV the filesystem looks like this:

wwwroot
---Coldbox
---MyApp
 
Whilst on PROD it looks like this:

MyApp
---Coldbox

My Application.cfc settings are:

// COLDBOX STATIC PROPERTY, DO NOT CHANGE UNLESS THIS IS NOT THE ROOT OF YOUR COLDBOX APP

COLDBOX_APP_ROOT_PATH = getDirectoryFromPath( getCurrentTemplatePath() );

// The web server mapping to this application. Used for remote purposes or static purposes

COLDBOX_APP_MAPPING   = ""

// COLDBOX PROPERTIES

COLDBOX_CONFIG_FILE  = "";

// COLDBOX APPLICATION KEY OVERRIDE

COLDBOX_APP_KEY  = "";


and nowhere that I can see am I adding an extra slash anywhere.

Can you see where the problem might lie?

Also, what's puzzling is that the problem only appears for one handler - all the other handlers, using identical coding style, work fine...

Michael Casey

unread,
Aug 4, 2017, 5:55:34 PM8/4/17
to ColdBox Platform
Solved!

The problem was being cased by case-sensitivity. The code looked like this: 

    <cfset event.setView("Persons/person")>


But the /views/persons/ directory was all lower case.


All corrected now.



Reply all
Reply to author
Forward
0 new messages