Adobe ColdFusion 2025 Bug: getBaseTagData() Doesn't Work Inside Closure
This morning, while trying to get my CFMailML project off the ground, I ran into a strange bug in Adobe ColdFusion 2025. When inside a custom tag, the getBaseTagData() function doesn't work if it's called from within a closure; even if said closure hasn't been passed out of scope. To demonstrate, I have a top-level page which does nothing but invoke a custom tag:
<cf_mytag>
Then, within the mytag.cfm file, I try to call getBaseTagData() twice: once in the main control flow and once inside an IFFE (Immediately-Invoked Function Expression):
<cfscript>
try {
// FIRST CALL: outside closure.
dumpMyTagData();
(() => {
// SECOND CALL: inside closure.
dumpMyTagData();
})();
} catch ( any error ) {
writeDump( error );
}
// ------------------------------------------------------------------------------- //
// ------------------------------------------------------------------------------- //
/**
* I dump-out the tag data for the current tag.
*/
private void function dumpMyTagData() {
writeDump( getBaseTagList().listToArray() );
writeDump( getBaseTagData( "cf_mytag" ) );
writeOutput( "<br>" );
}
</cfscript>
If we look at the page output for this Adobe ColdFusion 2025 code, we get the following:
As you can see, the call to getBaseTagData() throws an error when invoked inside the closure (IFFE). And if you look at the results of the getBaseTagList() function, you'll see that cf_mytag doesn't show up as an available tag in the hierarchy.
This means that any attempt to consume or transform ColdFusion custom tag data inside a .map() or .filter() iterator is likely to fail in a mysterious way.
Note that this works fine in Lucee CFML 6.
Want to use code from this post? Check out the license.
Reader Comments
The Adobe Tracker has been broken for the last few days; once it's up, I'll either link to an existing bug here or file a new one.
Post A Comment — ❤️ I'd Love To Hear From You! ❤️
Post a Comment →