Error when trying to configure Sitemap and Search

Description

Hi, I am a newbie in Farcry, yet managed to configure a site. All were working cool until we moved the project to a new server. I am now not able to configure the Sitemap and search. I get an error like this...

" Could not find the included template /farcry/projects/FC_Karyon/includedObj/D.
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.

The error occurred in D:\Websites\farcry\core\tags\webskin\include.cfm: line 33
Called from D:\Websites\FC_Karyon\webskin\dmInclude\displayPageKaryonSiteMap.cfm: line 10
Called from D:\Websites\farcry\core\packages\types\types.cfc: line 136
Called from D:\Websites\farcry\core\tags\navajo\display.cfm: line 284
Called from D:\Websites\farcry\core\tags\navajo\display.cfm: line 23
Called from D:\Websites\farcry\core\tags\navajo\display.cfm: line 1
Called from D:\Websites\FC_Karyon\www\index.cfm: line 4

31 : </cfif>
32 :
33 : <cfinclude template="#attributes.template#">
34 : </cfif>
35 :

When I comment the "<skin:include template="#stObj.include#" />" line in the include file then I dont see this error.

Can someone help me solve this?

Thanks in advance,
John

Environment

None

Activity

Michelle Gilbert 
January 11, 2008 at 9:16 PM

Hi John,
This seemed to resolve our issue: http://farcry.jira.com/browse/FC-914

The problem stems from the dmInclude.cfc file. There is a method here named getIncludeList.

The problem is that the resulting list has the full path to the include, a colon and then the name of the included file. Because a colon is the delimiter here the system thinks that "D:\path to include" is the file. So in the list in the form the value is "D".

It needs to be updated to this:

<cffunction access="public" name="getIncludeList" returntype="string" hint="returns a list (column name 'include') of available includes.">

<cfset var returnList = "" />
<cfset var qDir = queryNew("blah") />
<cfset var includeAlias = "" />

<cfset var qIncludes = application.coapi.coapiadmin.getIncludes() />

<cfloop query="qIncludes">
<cfset includeAlias = left(qIncludes.name, len(qIncludes.name)-4)>
<cfset returnList = listAppend(returnList, "#ListLast(qIncludes.PATH, "\/")#:#qIncludes.displayName#") />
</cfloop>

<cfreturn returnList>
</cffunction>

Note that this removes the unused line:

<cfset var includePath = application.path.project & "/includedObj">

And changes the return list like this:

<cfset returnList = listAppend(returnList, "#ListLast(qIncludes.PATH, "\/")#:#qIncludes.displayName#") />

There's a new listLast function in that line that gets just the file. (I guess I could have used getFileFromPath)

So now the form will use the include file name a the value in the drop down.

Applying the tag and type fix together allow the include to work.

Made the changes and it worked.

Michelle

Details

Assignee

Reporter

Components

Fix versions

Priority

Created January 7, 2008 at 12:36 PM
Updated July 2, 2010 at 4:12 AM