Skip navigation
cekweb
Currently Being Moderated

Lost on application.cfc

Jul 3, 2012 6:57 AM

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!

 
Replies
  • Currently Being Moderated
    Jul 3, 2012 7:06 AM   in reply to cekweb

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 3, 2012 7:31 AM   in reply to cekweb

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 3, 2012 8:04 AM   in reply to cekweb

    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

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points