Coldfusion 8 upgrade success, with 1 caveat for InterAKT users

I maintain some code that made use of InterAKTs WYSIWYG HTML editor. After the coldfusion 8 roll-out, I was getting strange errors on several pages, with this in my logs:

java.lang.StackOverflowError
at coldfusion.runtime.NeoBodyContent.cfoutput(NeoBodyContent.java:121)
at coldfusion.runtime.NeoBodyContent.cfoutput(NeoBodyContent.java:121)
at coldfusion.runtime.NeoBodyContent.cfoutput(NeoBodyContent.java:121)
at coldfusion.runtime.NeoBodyContent.cfoutput(NeoBodyContent.java:121)
at coldfusion.runtime.NeoBodyContent.cfoutput(NeoBodyContent.java:121)
at coldfusion.runtime.NeoBodyContent.cfoutput(NeoBodyContent.java:121)
at coldfusion.runtime.NeoBodyContent.cfoutput(NeoBodyContent.java:121)
at coldfusion.runtime.NeoBodyContent.cfoutput(NeoBodyContent.java:121)
at coldfusion.runtime.NeoBodyContent.cfoutput(NeoBodyContent.java:121)
at coldfusion.runtime.NeoBodyContent.cfoutput(NeoBodyContent.java:121)
at coldfusion.runtime.NeoBodyContent.cfoutput(NeoBodyContent.java:121)
at coldfusion.runtime.NeoBodyContent.cfoutput(NeoBodyContent.java:121)
at coldfusion.runtime.NeoBodyContent.cfoutput(NeoBodyContent.java:121)
at coldfusion.runtime.NeoBodyContent.cfoutput(NeoBodyContent.java:121)
- repeat like 500 times or so -It turns out that the cflib.cfm file that interAKT used has several functions in it that conflict with same-named CF8 functions. All you need to do is comment several of the cflib.cfm functions, and presto worko! Here is the cflib file included so you can copy / paste it (I take no credit for this work, I simply commented out several functions to not conflict with CF8!)

<br /><span class='comment'>      This library is part of the Common Function Library Project. An open source   collection of UDF libraries designed for ColdFusion 5.0. For more information,   please see the web site at:            http://www.cflib.org         Warning:   You may not need all the functions in this library. If speed   is _extremely_ important, you may want to consider deleting   functions you do not plan on using. Normally you should not   have to worry about the size of the library.         License:   This code may be used freely.    You may modify this code as you see fit, however, this header, and the header   for the functions must remain intact.      This code is provided as is. We make no warranty or guarantee. Use of this code is at your own risk.---></span><br /><span class='comment'>   This file contains only parts from various libraries at http://www.cflib.org/ .---></span><br /><cfscript><br />/**<br /> * Returns true if application variables are enabled.<br /> * <br /> * @return Returns a boolean. <br /> * @author Raymond Camden (ray@camdenfamily.com) <br /> * @version 1, April 29, 2002 <br /> */<br />function IsApplicationVarEnabled() {<br />   var foo = <span class='cc_value'>""</span>;<br />   try {<br />      foo = application.applicationName;<br />      return true;<br />   } catch(<span class='cc_value'>"Any"</span> e) {<br />      return false;<br />   }<br />}<br /><br />/**<br /> * Returns true if session variables are enabled.<br /> * <br /> * @return Returns a boolean. <br /> * @author Raymond Camden (ray@camdenfamily.com) <br /> * @version 1, April 29, 2002 <br /> */<br />function IsSessionVarEnabled() {<br />   var foo = <span class='cc_value'>""</span>;<br />   try {<br />      foo = session.urltoken;<br />      return true;<br />   } catch(<span class='cc_value'>"Any"</span> e) {<br />      return false;<br />   }<br />}<br /><br /></cfscript><br /><br /><span class='comment'> Mimics the cfabort tag. @param showError     An error to throw. (Optional) @return Does not return a value. @author Raymond Camden (ray@camdenfamily.com) @version 1, October 16, 2002 ---></span><br /><cffunction name=<span class='cc_value'>"abort"</span> output=<span class='cc_value'>"false"</span> returntype=<span class='cc_value'>"void"</span>><br />   <cfargument name=<span class='cc_value'>"showError"</span> type=<span class='cc_value'>"string"</span> required=<span class='cc_value'>"false"</span>><br />   <cfif isDefined(<span class='cc_value'>"showError"</span>) and len(showError)><br />      <cfthrow message=<span class='cc_value'>"#showError#"</span>><br />   </cfif><br />   <cfabort><br /></cffunction><br /><br /><span class='comment'> Mimics the cfinclude tag. @param template     The template to include. (Required) @return Does not return a value. @author Raymond Camden (ray@camdenfamily.com) @version 1, October 24, 2002 ---></span><br /><br /><cffunction name=<span class='cc_value'>"include"</span> output=<span class='cc_value'>"false"</span> returntype=<span class='cc_value'>"void"</span>><br />   <cfargument name=<span class='cc_value'>"template"</span> type=<span class='cc_value'>"string"</span> required=<span class='cc_value'>"true"</span>><br />   <cfinclude template=<span class='cc_value'>"#template#"</span>><br /></cffunction><br /><br /><span class='comment'> Mimics the cfdirectory, action=&amp;quot;create&amp;quot; command. @param directory     Name of directory to create. (Required) @param mode     Mode to apply to directory. (Optional) @return Does not return a value. @author Raymond Camden (ray@camdenfamily.com) @version 1, October 15, 2002 ---></span><br /><cffunction name=<span class='cc_value'>"directoryCreate"</span> output=<span class='cc_value'>"false"</span> returntype=<span class='cc_value'>"void"</span>><br />   <cfargument name=<span class='cc_value'>"directory"</span> type=<span class='cc_value'>"string"</span> required=<span class='cc_value'>"true"</span>><br />   <cfargument name=<span class='cc_value'>"mode"</span> type=<span class='cc_value'>"string"</span> required=<span class='cc_value'>"false"</span> default=<span class='cc_value'>""</span>><br />   <cfif len(mode)><br />      <cfdirectory action=<span class='cc_value'>"create"</span> directory=<span class='cc_value'>"#directory#"</span> mode=<span class='cc_value'>"#mode#"</span>><br />   <cfelse><br />      <cfdirectory action=<span class='cc_value'>"create"</span> directory=<span class='cc_value'>"#directory#"</span>><br />   </cfif><br /></cffunction><br /><br /><span class='comment'> Mimics the cfdirectory tag, action=&amp;quot;delete&amp;quot; command. @param directory     The directory to delete. (Required) @return Does not return a value. @author Raymond Camden (ray@camdenfamily.com) @version 1, October 15, 2002 ---></span><br /><cffunction name=<span class='cc_value'>"directoryDelete"</span> output=<span class='cc_value'>"false"</span> returntype=<span class='cc_value'>"void"</span>><br />   <cfargument name=<span class='cc_value'>"directory"</span> type=<span class='cc_value'>"string"</span> required=<span class='cc_value'>"true"</span>><br />   <cfdirectory action=<span class='cc_value'>"delete"</span> directory=<span class='cc_value'>"#directory#"</span>><br /></cffunction><br /><br /><!---<br /> Mimics the cffile, action=&amp;quot;copy&amp;quot; command.<br /> <br /> @param source     Source file to copy. (Required)<br /> @param destination     Path to copy file to. (Required)<br /> @param mode     Defines permissions for a file on non-Windows systems. (Optional)<br /> @param attributes     File attributes. (Optional)<br /> @return Does not return a value. <br /> @author Raymond Camden (ray@camdenfamily.com) <br /> @version 1, October 15, 2002 <br /><br /><cffunction name=<span class='cc_value'>"fileCopy"</span> output=<span class='cc_value'>"false"</span> returntype=<span class='cc_value'>"void"</span>><br />   <cfargument name=<span class='cc_value'>"source"</span> type=<span class='cc_value'>"string"</span> required=<span class='cc_value'>"true"</span>><br />   <cfargument name=<span class='cc_value'>"destination"</span> type=<span class='cc_value'>"string"</span> required=<span class='cc_value'>"true"</span>><br />   <cfargument name=<span class='cc_value'>"mode"</span> type=<span class='cc_value'>"string"</span> default=<span class='cc_value'>""</span> required=<span class='cc_value'>"false"</span>><br />   <cfargument name=<span class='cc_value'>"attributes"</span> type=<span class='cc_value'>"string"</span> default=<span class='cc_value'>""</span> required=<span class='cc_value'>"false"</span>><br />   <cfif len(mode)><br />      <cffile action=<span class='cc_value'>"copy"</span> source=<span class='cc_value'>"#source#"</span> destination=<span class='cc_value'>"#destination#"</span> mode=<span class='cc_value'>"#mode#"</span>><br />   <cfelse><br />      <cffile action=<span class='cc_value'>"copy"</span> source=<span class='cc_value'>"#source#"</span> destination=<span class='cc_value'>"#destination#"</span> attributes=<span class='cc_value'>"#attributes#"</span>><br />   </cfif><br /></cffunction><br />---><br /><span class='comment'> Mimics the cffile, action=&amp;quot;delete&amp;quot; command. @param file     The file to delete. (Required) @return Does not return a value. @author Raymond Camden (ray@camdenfamily.com) @version 1, October 15, 2002          ---></span><br /><!---<br /> Mimics the cffile, action=&amp;quot;move&amp;quot; command.<br /> <br /> @param source     Souce file to move. (Required)<br /> @param destination     Path to move file to. (Required)<br /> @param mode     Defines permissions for a file on non-Windows systems. (Required)<br /> @param attributes     File attributes. (Optional)<br /> @return Does not return a value. <br /> @author Raymond Camden (ray@camdenfamily.com) <br /> @version 1, October 15, 2002 <br /><br /><cffunction name=<span class='cc_value'>"fileMove"</span> output=<span class='cc_value'>"true"</span> returntype=<span class='cc_value'>"void"</span>><br />   <cfargument name=<span class='cc_value'>"source"</span> type=<span class='cc_value'>"string"</span> required=<span class='cc_value'>"true"</span>><br />   <cfargument name=<span class='cc_value'>"destination"</span> type=<span class='cc_value'>"string"</span> required=<span class='cc_value'>"true"</span>><br />   <cfargument name=<span class='cc_value'>"mode"</span> type=<span class='cc_value'>"string"</span> default=<span class='cc_value'>""</span> required=<span class='cc_value'>"false"</span>><br />   <cfargument name=<span class='cc_value'>"attributes"</span> type=<span class='cc_value'>"string"</span> required=<span class='cc_value'>"false"</span> default=<span class='cc_value'>""</span>><br />   <br />   <cfif len(mode)><br />   <span class='comment'>         by and action=delete on the source. After I had done this, magically, file upload started working. ---></span><br />      <cffile action=<span class='cc_value'>"copy"</span> destination=<span class='cc_value'>"#destination#"</span> mode=<span class='cc_value'>"#mode#"</span> source=<span class='cc_value'>"#source#"</span>> <br />      <cffile action=<span class='cc_value'>"delete"</span> file=<span class='cc_value'>"#source#"</span>><br />      <span class='comment'> ---></span><br />   <cfelse><br />      <cffile action=<span class='cc_value'>"move"</span> source=<span class='cc_value'>"#source#"</span> destination=<span class='cc_value'>"#destination#"</span> attributes=<span class='cc_value'>"#attributes#"</span>><br />   </cfif>   <br /></cffunction><br />---><br /><!---<br /> Mimics the cffile, action=&amp;quot;write&amp;quot; command.<br /> <br /> @param file     The file to write to. (Required)<br /> @param output     The data to write. (Required)<br /> @param mode     Defines permissions for a file on non-Windows systems. (Optional)<br /> @param addNewLine     If true, a new line character is added to output. (Optional)<br /> @param attributes     File attributes. (Optional)<br /> @return Does not return a value. <br /> @author Raymond Camden (ray@camdenfamily.com) <br /> @version 1, October 15, 2002 <br /><br /><cffunction name=<span class='cc_value'>"fileWrite"</span> output=<span class='cc_value'>"false"</span> returntype=<span class='cc_value'>"void"</span>><br />   <cfargument name=<span class='cc_value'>"file"</span> type=<span class='cc_value'>"string"</span> required=<span class='cc_value'>"true"</span>><br />   <cfargument name=<span class='cc_value'>"output"</span> type=<span class='cc_value'>"string"</span> required=<span class='cc_value'>"true"</span>><br />   <cfargument name=<span class='cc_value'>"mode"</span> type=<span class='cc_value'>"string"</span> default=<span class='cc_value'>""</span> required=<span class='cc_value'>"false"</span>><br />   <cfargument name=<span class='cc_value'>"addNewLine"</span> type=<span class='cc_value'>"boolean"</span> default=<span class='cc_value'>"yes"</span> required=<span class='cc_value'>"false"</span>><br />   <cfargument name=<span class='cc_value'>"attributes"</span> type=<span class='cc_value'>"string"</span> default=<span class='cc_value'>""</span> required=<span class='cc_value'>"false"</span>><br />   <cfif mode is <span class='cc_value'>""</span>><br />      <cffile action=<span class='cc_value'>"write"</span> file=<span class='cc_value'>"#file#"</span> output=<span class='cc_value'>"#output#"</span> addnewline=<span class='cc_value'>"#addNewLine#"</span> attributes=<span class='cc_value'>"#attributes#"</span>>   <br />   <cfelse><br />      <cffile action=<span class='cc_value'>"write"</span> file=<span class='cc_value'>"#file#"</span> output=<span class='cc_value'>"#output#"</span> mode=<span class='cc_value'>"#mode#"</span> addnewline=<span class='cc_value'>"#addNewLine#"</span> attributes=<span class='cc_value'>"#attributes#"</span>>   <br />   </cfif><br /></cffunction><br />---><br /><span class='comment'> Mimics the cfexecute tag. Updated for CFMX var scope. @param name     Program to execute. (Required) @param args     Args to pass. Can be string or array. (Optional) @param timeout     Time to wait for program execution. (Optional) @param outputFile     File to save results. (Optional) @return Returns a string. @author Raymond Camden (ray@camdenfamily.com) @version 1, October 16, 2002 ---></span><br /><cffunction name=<span class='cc_value'>"execute"</span> output=<span class='cc_value'>"false"</span> returntype=<span class='cc_value'>"string"</span>><br />   <cfargument name=<span class='cc_value'>"name"</span> type=<span class='cc_value'>"string"</span> required=<span class='cc_value'>"true"</span>><br />   <cfargument name=<span class='cc_value'>"args"</span> type=<span class='cc_value'>"any"</span> required=<span class='cc_value'>"false"</span> default=<span class='cc_value'>""</span>><br />   <cfargument name=<span class='cc_value'>"timeout"</span> type=<span class='cc_value'>"string"</span> required=<span class='cc_value'>"false"</span> default=<span class='cc_value'>"0"</span>><br />   <cfargument name=<span class='cc_value'>"outputfile"</span> type=<span class='cc_value'>"string"</span> required=<span class='cc_value'>"false"</span> default=<span class='cc_value'>""</span>><br /><br />   <cfset var result = <span class='cc_value'>""</span>><br />   <br />   <cfsavecontent variable=<span class='cc_value'>"result"</span>><br />      <cfif len(outputFile)><br />         <cfexecute name=<span class='cc_value'>"#name#"</span> arguments=<span class='cc_value'>"#args#"</span> timeout=<span class='cc_value'>"#timeout#"</span> outputfile=<span class='cc_value'>"#outputfile#"</span>/><br /><span class='comment'>               ---></span><br />      <cfelse><br />         <cfexecute name=<span class='cc_value'>"#name#"</span> arguments=<span class='cc_value'>"#args#"</span> timeout=<span class='cc_value'>"#timeout#"</span>/><br />      </cfif><br />   </cfsavecontent><br />   <cfreturn result><br /></cffunction><br /><br /><br /><!---<br /> Mimics the cffile, action=&amp;quot;append&amp;quot; command.<br /> <br /> @param file     The file to append. (Required)<br /> @param output     The data to append. (Required)<br /> @param mode     Defines permissions for a file on non-Windows systems. (Optional)<br /> @param addNewLine     If true, a new line character is added to output. (Optional)<br /> @param attributes     File attributes. (Optional)<br /> @return Does not return a value. <br /> @author Raymond Camden (ray@camdenfamily.com) <br /> @version 1, October 15, 2002 <br />---><br /><cffunction name=<span class='cc_value'>"fileAppend"</span> output=<span class='cc_value'>"false"</span> returntype=<span class='cc_value'>"void"</span>><br />   <cfargument name=<span class='cc_value'>"file"</span> type=<span class='cc_value'>"string"</span> required=<span class='cc_value'>"true"</span>><br />   <cfargument name=<span class='cc_value'>"output"</span> type=<span class='cc_value'>"string"</span> required=<span class='cc_value'>"true"</span>><br />   <cfargument name=<span class='cc_value'>"mode"</span> type=<span class='cc_value'>"string"</span> default=<span class='cc_value'>""</span> required=<span class='cc_value'>"false"</span>><br />   <cfargument name=<span class='cc_value'>"addNewLine"</span> type=<span class='cc_value'>"boolean"</span> default=<span class='cc_value'>"yes"</span> required=<span class='cc_value'>"false"</span>><br />   <cfargument name=<span class='cc_value'>"attributes"</span> type=<span class='cc_value'>"string"</span> default=<span class='cc_value'>""</span> required=<span class='cc_value'>"false"</span>><br />   <cfif mode is <span class='cc_value'>""</span>><br />      <cffile action=<span class='cc_value'>"append"</span> file=<span class='cc_value'>"#file#"</span> output=<span class='cc_value'>"#output#"</span> addnewline=<span class='cc_value'>"#addNewLine#"</span> attributes=<span class='cc_value'>"#attributes#"</span>>   <br />   <cfelse><br />      <cffile action=<span class='cc_value'>"append"</span> file=<span class='cc_value'>"#file#"</span> output=<span class='cc_value'>"#output#"</span> mode=<span class='cc_value'>"#mode#"</span> addnewline=<span class='cc_value'>"#addNewLine#"</span> attributes=<span class='cc_value'>"#attributes#"</span>>   <br />   </cfif><br /></cffunction><br /><br /><br />
Digg StumbleUpon Facebook Technorati Fav newsvine reddit FARK Google Bookmarks