Wolandello
Wolandello

Reputation: 127

Could not find the included template

When I'd like to run idnex.cfm there is error "Could not find the included template". I should use CF admin mappings, but there are a lot of such errors in different files. So, is there the easier way to solve a problem?

Full error message:
Could not find the included template spiderBlock.cfm.
Note: If you wish to use an absolute template path (for example, template="/mypath/index.cfm") with CFINCLUDE, you must create a mapping for the path using the ColdFusion Administrator. Or, you can use per-application settings to specify mappings specific to this application by specifying a mappings struct to THIS.mappings in Application.cfc.
Using relative paths (for example, template="index.cfm" or template="../index.cfm") does not require the creation of any special mappings. It is therefore recommended that you use relative paths with CFINCLUDE whenever possible. 

Upvotes: -2

Views: 4332

Answers (1)

Adam Cameron
Adam Cameron

Reputation: 29870

The error should also tell you WHICH template it can't find, including the path CF is looking for it on. Is that file at the location CF is looking for it? I suspect not.

If you start by giving us the full error message, we've got something to work with to make sensible comment on this.

As others have suggested there's a few ways the included file can be referenced in the including template: relative to its own location, absolutely from the CF root, or absolutely from a resolved mapping. So you might need to check your mappings as well (which'll be defined in CFAdmin or Application.cfc).

Upvotes: 1

Related Questions