Skip to main content
Known Participant
June 13, 2010
Question

Application variable not being recognized when calling a customtag

  • June 13, 2010
  • 1 reply
  • 760 views

This is a snapshop of my file structure:

/root/application.cfm

/customtags/mytag.cfm

/folder1/my_page.cfm

/folder1/application.cfm

"/folder1/my_page.cfm" calls a custom tag "/customtags/mytag.cfm" that references an application variable that exists both in the "/root/application.cfm" and in "/folder1/application.cfm" but for some reason the custom tag is erroring out saying the application variable does not exist.  I think I'm missing some very basic understanding here, hahaha.

Thanks,

Paul

    This topic has been closed for replies.

    1 reply

    Inspiring
    June 13, 2010

    The file name is Application.cfm, not application.cfm, but this only matters (other than for the sake of accuracy) on *nix.

    What you describe of your code suggests it should work.

    You might have to post the code for my_apge1.cfm, its adjacent Application.cfm, and mytag.cfm so we can work out what's up.

    --

    Adam

    Known Participant
    June 13, 2010

    Well there's nothing really to the /folder1/my_page.cfm

    It just calls the "/customtags/mytag.cfm" via <cfmodule> tag.

    But, I do access that APPLICATION variable somewhere else in "/folder1/my_page.cfm" and it finds it and uses it just fine.  The error is occurring in the customtag saying the application variable is not defined.

    Thanks

    Paul

    Inspiring
    June 13, 2010

    Stick a <cfdump var="#application#"> in both the my_page.cfm and mytag.cfm, to see if any differences cast any light on the scene for you.

    --

    Adam