7 Replies Latest reply on Feb 27, 2011 1:48 PM by 12Robots

    ColdFusion Builder cfinclude Does Not Work

    somecfguy

      I decided to give CFB a try... and I can't do the simplest thing.  I cannot cfinclude something.  I keep getting "could not find the included template" - it's obvious why, CFB is trying to map the relative path "/" to wwwroot on my local machine when it should be mapping it to "/websites/sitenamet/" - is there a setting to configure this (other than CF administrator mappings)?

       

      This is a gd tragedy.  I can't believe that I've wasted 4 hours of my day and can't write one damn line of code.  I'm sending an invoice to Adobe for $1,000 for my time wasted.

       

      Please help!

        • 1. Re: ColdFusion Builder cfinclude Does Not Work
          12Robots Level 4

          Ok, first, calm down. It's not Adobe's fault you don't know what you're doing.

           

          Second, what are you trying to do? You say you are using ColdFusion Builder, but you are talking about ColdFusion server error messages?  Are you running the application in the built in browser?  The built in browser is just that, a built in browser. It is not goign to "map" things differently just because you are running it from within CFB.

           

          How about posting the code that is giving you trouble?  I really don't understnad what you mean when you say 'it's obvious why, CFB is trying to map the relative path "/" to wwwroot on my local machine when it should be mapping it to "/websites/sitenamet/"'. CFB is not trying to map anything.

           

          • 2. Re: ColdFusion Builder cfinclude Does Not Work
            somecfguy Level 1

            Thanks for the candor.  Let me clarify further:

             

            This code:

             

            <cfinclude template="/api/createslug.cfm">

             

            Gives me the following error:

            (in the FireFox built-in browser running the local set of code)

             

            "Could not find the included template /api/createSlug.cfm"

             

            The reason is:

             

            CFB is trying to load the file from this path:

            C:\ColdFusion9\wwwroot\api\createSlug.cfm

             

            Instead of this path:

            C:\ColdFusion9\wwwroot\websites\sitename\api\createSlug.cfm

             

            Is there a setting to change where CFB considers the root aka "/" to be?

            • 3. Re: ColdFusion Builder cfinclude Does Not Work
              somecfguy Level 1

              After playing around with CFB and learning about all of it's shortcomings including the fact that it doesn't have auto complete tags, I have concluded that Dreamweaver is a far superior product for rapid application development.

               

              Good bye, ColdFusion Builder.  Thanks for nothing.

              • 4. Re: ColdFusion Builder cfinclude Does Not Work
                cfjedimaster Level 3

                Dude. Did you actually read what Jason said? The editor is not at fault here. The error you are getting is coming from ColdFusion the server. Not ColdFusion Builder. It's your code. And it's also easily fixable. If you still want help, just ask.

                • 5. Re: ColdFusion Builder cfinclude Does Not Work
                  cfjedimaster Level 3

                  There could possibly be a / mapping in your CF Admin. As has been said multiple times now, this is NOT a CFB issue. It is a CF Server thing (and NOT a bug - you are just doing something wrong). Go to your CF Admin, Mappings, and see if you see a / mapping.

                  • 6. Re: ColdFusion Builder cfinclude Does Not Work
                    12Robots Level 4

                    It does have autocomplete tags.

                     

                    Seriously, why are you so angry? You are so determined to find something wrong with it, but you really don't have any idea what you are talking about.

                     

                    I really hope you're not actually charging anyone $250/hr for your time.  I doubt you're worth it.

                     

                    I'll be sending you an invoice

                     

                     

                    Jason

                    • 7. Re: ColdFusion Builder cfinclude Does Not Work
                      12Robots Level 4

                      By the way. TO make your cfinclude work, you should use a relative path instead of an absolute one.

                       

                      Instead of

                       

                      <cfinclude template="/api/createslug.cfm">

                       

                      use

                       

                      <cfinclude template="api/createslug.cfm">

                       

                      Notice the lack of the frontslash at the beginning.

                       

                      And again, this has nothing to do with CFB, this is a ColdFusion error.  You would get the same error if you browsed to the page in a normal web browser.

                       

                      The above is assuming the calling page is in C:\ColdFusion9\wwwroot\websites\sitename

                       

                      You could also create a server or application specific mapping to /api, then you could use that absolute path all you want.

                       

                       

                      Of course, none of this has anything to do with CFB. You would have the same problems with that code in Dreamweaver.