Hi all,
I've used application.cfm for ages on our site (now in sustainment) and we have been moved to a new server using CF9. Our server dudes have "per application" settings in place where I can map my custom tag directory (works fine) but when I use application.cfc, I begin crashing on all my pages that use relative pathing.
For example, the first thing the application does is query an Oracle table to get security settings. This is located off the root in a folder (oddly enough) called Security. That folder has a subdirectory called queries. I bomb with an error saying that "<cfinclude template="queries/user_role_select.cfm">" is invalid and it cannot find the noted cfm file and that I have to set up mappings in my application.cfc file.
Does this mean that I have to provide mappings for every directory and subdirectory under my root folder? Surely not! If so, how can this be done and how would I use that mapping in my cfincludes? I'm really getting started with the cfc files late in the game so any guidance and direction is GREATLY appreciated.
Thanks in advance!
For example, the first thing the application does is query an Oracle table to get security settings. This is located off the root in a folder (oddly enough) called Security. That folder has a subdirectory called queries. I bomb with an error saying that "<cfinclude template="queries/user_role_select.cfm">" is invalid and it cannot find the noted cfm file and that I have to set up mappings in my application.cfc file.
What is the EXACT error message? Don't paraphrase it, copy and paste it from the screen.
Also: what is the full file system path to the file with the <cfinclude> in it, and the file system path to queries/user_role_select.cfm?
What mappings have you set in CFAdmin and in your Application.cfc pseudo constructor? Ditto custom tag paths (although the latter ought not be relevant here)?
--
Adam
The only mapping I've placed in the application.cfm is the mapping to the custom tag path:
"THIS.customTagPaths = "\\mw\ewh\dev\vol01\vanity\giss\CustomTags";"
I've never had to do mappings before using the application.cfm file so I'm somewhat befuddled as to how to do so, what scope I need to have, etc.
I tried every combination of " " locations and still no luck. Again, if I remove the application.cfc and go back to the application.cfm I've used forever, all my relative paths work just fine. However, if I do that, I'm now unable to access the custom tags, even using the <cfmodule> tag since CF won't allow me to specify a tag location using application.cfm. My only option is to put my custom tags in the root directories of every directory that uses them and then I can call them. Problem is, I use some of the tags in many different apps. The domain I'm working in has "about" 30 unique tools and "about" 70 directories. My main goal is to avoid mass recoding if possible.
Nono, not in the <cfinclude>; just as stand-alone code, so you can see what it resolves to. EG: at the top of the file put this:
<cfoutput>#expandath("queries/user_role_select.cfm")#</cfotuput>
<cfabort>
Just to be absolutely clear: this has nothing to do with migrating from Application.cfm to Application.cfc: that would not impact this sort of thing. It's something else.
--
Adam
\\mw\ewh\DEV\Vol01\Vanity\giss\queries\user_role_select.cfm
By the way, the giss level is the domain level root.
North America
Europe, Middle East and Africa
Asia Pacific