This is a known farcry bug but one that I run into constantly so I finally took the time to fix it on my install.
When creating a new dmInclude object you are supposed to be given a display method dropdown but it never shows up. Why you ask? I’ll tell you why. And by the way, I have only confirmed this for farcry version 3.0.2 and it only seems to happen if the install uses the pliant webskin.
When you create a new Include it calls /farcry_core/packages/types/_dmInclude/edit.cfm. On line 110 of that file a widget called displayMethodSelector is called. This file is at /farcry_core/tags/widgets/. edit.cfm passes a parameter called prefix set to “displayPage”. Line 33 of /farcry_core/tags/widgets/displayMethodSelector.cfm calls listTemplates.cfm which is in /farcry_core/tags/navajo/ and passes it the attributes.prefix variable that it got from edit.cfm (still “displayPage”). listTemplates.cfm has code on lines 24-31 that looks like this:
<cfdirectory action="LIST" filter="*.cfm" name="qTemplates" directory="#attributes.path#">
<!--- This is to overcome casesensitivity issues on mac/linux machines --->
<cfquery name="qTemplates" dbtype="query">
SELECT *
FROM qTemplates
WHERE lower(qTemplates.name) LIKE <cfqueryparam cfsqltype="cf_sql_varchar" value="#attributes.prefix#%">
</cfquery>
I praise Daemon for doing this case sensitivity check to make sure their product works on all systems. However, I have to scold them for the default value of the prefix variable.
This code is looking for all files in the /project_name/webskin/dmInclude directory with the prefix of “displayPage” but the example files in that directory have the prefix of “display”. THAT is why there’s nothing in the dropdown.
There are 2 ways to fix this but I will only recommend 1. The first, and strongly recommended fix is to change the file names from “display…” to “displayPage…” inside the /project_name/webskin/dmInclude directory. The second and far less recommended way to fix it is to change the default value of the prefix variable in /farcry_core/packages/types/_dmInclude/edit.cfm to “display”.
I recommend the first way of fixing this because in all the other type classes “displayPage” is the standard prefix so it would be a reasonable assumption that “displayPage” is what they meant but it just didn’t come out that way.
To fix this for future installs (if you are using the pliant webskin) go to /farcry_pliant/webskin/dmInclude and rename those files to be “displayPage…”.

Related Articles
No user responded in this post
Leave A Reply