• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

ColdFusion Builder cfinclude Does Not Work

New Here ,
Feb 26, 2011 Feb 26, 2011

Copy link to clipboard

Copied

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!

TOPICS
Builder

Views

1.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 26, 2011 Feb 26, 2011

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 27, 2011 Feb 27, 2011

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 27, 2011 Feb 27, 2011

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 27, 2011 Feb 27, 2011

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 27, 2011 Feb 27, 2011

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 27, 2011 Feb 27, 2011

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 27, 2011 Feb 27, 2011

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation