Skip to main content
July 3, 2012
Question

Lost on application.cfc

  • July 3, 2012
  • 1 reply
  • 887 views

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!

    This topic has been closed for replies.

    1 reply

    Inspiring
    July 3, 2012

    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

    July 3, 2012

    Inspiring
    July 3, 2012

    Check the user perms on the included file?  Does CF have access to it?

    What gets output if you do expandPath("queries/user_role_select.cfm") from within login_auth.cfm?

    --

    Adam