CF9 Doesn't Like Mango Blog

Tools of the Trade , ColdFusion Add comments

Well, I upgraded my server to CF9, and there were both some immediate and subtle hiccups working with the latest build of Mango Blog. I've mentioned some of these in the forums, but here they are.

First, the site would not run. I got: "Error: Object of type class java.lang.String cannot be used as an array". I narrowed down the issue to: "cfset to = arraylen(linkCategories)"

The issue was inside \tags\mangoextras\LinkCategories.cfm on Line 14. I basically put the code inside a catch/try and on error set "to" to 0. Not sure if its accurate, but it work, the site load.

This sparked my curiousity. I cleared the error and ran through some basic stuff. The cfformprotect plugin threw an error. This one I'm not 100% certain is CF9 related, or just an error related to the code there.

This one threw: "Element RAWDATA.COMMENT_NAME is undefined in DATA. "

Going further, I ran CF9's Code Analyzer, and found a whole bunch of stuff.


The first and the last one are especially interesting. ArrayFind is a reserved name and "location" as well.

I'm sure there is more!

2 responses to “CF9 Doesn't Like Mango Blog”

  1. Gary Gilbert Says:
    Arrayfind is a new function that was introduced with CF9, and location is a function wrapper for the cflocation tag.

    They sure introduced a lot of new things that could potentially cause a lot of problems for legacy code where people created user defined functions to implement functionality that didnt previously exist in CF.

    It goes to show how important variable prefixing is even today. Perhaps Hungarian notation is still the best way to go.
  2. Big Mad Kev Says:
    I'd agree with Gary you need to prefix with UDF_ then the function name to stop this from happening. A bit late in the day and us it makes for more typing but will save you grief going forward.

    As for Hungarian notation, I'm guessing you mean the Systems Hungarian notation version of it ;) Rather then the true intended Apps Hungarian notation.

    Great article here: http://www.joelonsoftware.com/articles/Wrong.html

Leave a Reply

Leave this field empty:



Powered by Mango Blog. Design and Icons by N.Design Studio