Wednesday 19 February 2014

ColdFusion 11: first bug. Bad bug.

G'day:
Well that didn't take long.

One can no longer <cfinclude> any sort of file except a CFML file. EG:

<cfinclude template="junk.js">

This yields:

Invalid template junk.js provided for CFINCLUDE tag.

CFINCLUDE tag only supports including ColdFusion templates.
The error occurred inC:/apps/adobe/ColdFusion/11beta/gettingstarted/cfusion/wwwroot/shared/misc/junk/junk.cfm: line 1
1 : <cfinclude template="junk.js">

Honestly, Adobe... what the f*** are you people thinking? Why did you change this?

Clarification:

This is all "by design" and is even documented. Thanks to Ray for digging this out:

Restrictions
[...]
Also, for the <cfinclude> tag, this restriction is applicable. By default, you can include only CFM files. However, you can modify allowedextinclude key in neo-runtime.xml file to add your own file type.

<var name="allowedextforinclude"><string>HTM,HTML</string></var>

(Note: this was changed to compileextforinclude, by the time ColdFusion 11 was actually released).

And I have changed the setting, and it "works". But more on this in another article...


I'm also quite surprised this was not picked up on the prerelease.

As my main tool for testing - TestBox - relies on this functionality, I have had my abilities to test ColdFusion 11 somewhat curtailed.

I've raised this as a bug: 3710270.

--
Adam