ColdFusion's Multi File uploader is impacted by debugging

Ok, so this probably falls into the realm of "Obvious", but both myself and a reader were surprised by this. Credit for it goes to John Pansewicz. He pinged me earlier this week saying that ColdFusion 9's multi file uploader failed to work for him. No matter what he uploaded he got a bad result. I tried the same code on my machine and saw nothing wrong. Then John figured out that it was ColdFusion debugging breaking the response. Again - obvious - but I tend to only worry about debugging when running against CFCs and Ajax applications. The multi file uploader is a Flash application and it just didn't occur to me that I had to be concerned about it. However - if you look at the docs for the feature (see here) you can see that JSON must be output to the control for it to know how the files were processed. Anything that breaks that JSON (including ColdFusion debugging) will make the control think the files had an error during the upload.

Finally - don't forget that you can turn off debugging on a request by request basis. Don't think you must completely turn off the feature if you have one bit of JSON in your local project. Just make use of the cfsetting tag to disable it for that particular request.

Cumulative Hotfix for 901 Released

The title pretty much says it all. You can get a new hotfix for ColdFusion 901 here: Cumulative Hotfix 1 (CHF1) for ColdFusion 9.0.1

Note that this addresses the JSON issues folks were having issue with!

Speaking at RIAUnleashed

Brian Rinaldi has updated the schedule for this years RIAUnleashed conference. The line up looks incredible. You've got a great list of speakers along with a great list of sessions. My topic is on ColdFusion and Solr integration, with the catchy title of ColdFusion, Solr, and Killer Robots. After my impromptu session on Solr at this year's CFUNITED, I thought it would be nice to do something a bit more formal. I'm also going to be creating a real (if small) application to demonstrate how effective Solr can be for your web site. I highly encourage folks to register today for the early bird price. Last year's conference was great and I think this one will be even better.


Small formatting issue with emails sent via ColdFusion 9 Mail.cfc

Using the new mail.cfc to send emails in ColdFusion 9? You may notice an odd formatting issue. Check out this screen shot:

I thought this was whitespace in my code, but turns out it is the code that implements mail in script. Find base.cfc in your cf install\customtags\com\adobe\coldfusion folder. Open it and go to line 417. (Note - the tags as script stuff changed in 901. So if you are still on 900, your line number may be different.) On line 417 you will see #mailbody# as a variable, tabbed over. Simply remove the tabs. Here is a slice of the file:

Quick note - the white space did not render perfectly on my blog - so you will just have to imagine that mailbody is the online code all the way to the left.

   view plainprintabout
 <cfmail attributeCollection="#tagAttributes#">
 #mailbody#
  <cfloop array="#params#" index="mailparam">
  <cfmailparam attributeCollection="#mailparam#">
  </cfloop>
  <cfloop array="#parts#" index="mailpart">
  <!--- Capture mailpart content into a local variable and delete body attribute --->
  <cfif structkeyexists(mailpart,"body")>
  <cfset var mailpartbody = mailpart["body"]>
10   <cfset structdelete(mailpart,"body")>
11   </cfif>
12   <cfmailpart attributeCollection="#mailpart#">
13   #trim(mailpartbody)#
14   </cfmailpart>
15   </cfloop>
16   </cfmail>

This fixes it up. You still get some whitespace after the message, but that should be pretty much invisible to the end user. You could remove all the white space if you wanted to, but I thought that was overkill.

CF901 CFGRID's new multirowselect feature

Earlier this week a user asked me to look into something odd with CF901's new multirowselect feature for cfgrid. If you haven't played with this yet, it is a way to enable multiple row selections in a grid. Unfortunately it doesn't quite work as advertised, but in this blog entry I'll tell you how to make it work.

[More]

ColdFusion Unconference - Sessions Announced

So this was actually announced quite a bit earlier on Twitter, but as I've been bug hunting all day I didn't get a chance to blog about it till now. You can now find the official list of sessions and speakers for the ColdFusion Unconference here:

ColdFusion Unconference

I've actually purchased a nicer domain name but haven't yet hooked it up. Ignoring that though - check out the list of speakers and sessions. This is a fracking rock star set of content if I may be so bold. (Yes, I will be.)

I will also remind people that you can attend MAX for the low cost of 200 dollars. Yes, 200 bucks. That gives you that "Exhibits-only" pass which allows you access to all 4 Unconferences. (Yes, there are 3 other ones as well. But all the cool kids will be at the ColdFusion one.) I think it's worthwhile to go for the full MAX experience but if you are on a limited budget, this is definitely a great option.

I've only one thing left to say:

Big thanks to all the speakers who agreed to participate as well as Ezra Parker and Charlie Griefer for once again being co-managers of this event.

Select boxes that limit other select boxes

That title probably doesn't do a great job of introducing the topic, but hopefully it will make more sense by the time the entry is done. A reader wrote me this week asking how to create select boxes that all share the same options. However, as soon as you pick an option in one, that option would then be removed from the other ones. A good example of this would be sorting data. Imagine you had N products. For each product you want to assign a ranking to it. Only one product can be 1, only one can be 2, and so on. Imagine that as you selected a particular rank, that rank was then removed from the others. Here's how I solved the problem using a little bit of ColdFusion and jQuery, my peanut butter and chocolate.

[More]

Is HTMLEditFormat enough?

Patrick asks:

You schooled me on using vars in my cfc to help ratchet up the security. If I used the following code in my cfc that processes my contact form, do you feel like the data would be cleansed and relatively benign? I'm also using cfparams in the page with the form and validating it with jQuery and/or CF server side code (for non Java visitors) as well.

<cfargument name="email" type="string" required="yes">
<cfargument name="fullname" type="string" required="yes">

<cfset var elements = structNew()>
<cfset elements.email = htmlEditFormat(trim(arguments.email))>
<cfset elements.fullname = htmlEditFormat(trim(arguments.fullname))>

[More]

ColdFusion Administrator bug with mappings

Watch out for this one - I almost didn't notice it. Today I went to add a new mapping. It just so happened that the mapping I added was one that already existed. The administrator correctly noticed this and gave me an error:

No big deal, right? I'll just rename mine to /org2 and hit submit.

Ouch. It actually replaced my org mapping. Not the end of the world, but if you had a lot of mappings it could easily be missed. Note - I recommend - almost always - that you use Application specific mappings. In my case though it is a code base I can't modify just yet.

I have filed a bug report for this, but unfortunately the public bug base still hides 901 bugs.

Can a web action fire off an AIR event?

This was a great question that came in via a reader last week. Because of the nature of his business I have to be a bit vague. Basically he wanted to know if there was some way where a click on a web page could have some type of response within an AIR application. As with most things there are a few ways this could be handled. Here is what I came up with (and consider this a call out for more ideas and suggestions please!).

[More]

More Entries