IMPORTANT: Deprecations & Feature Removals in ...
# adobe
m
IMPORTANT: Deprecations & Feature Removals in CF2025 https://community.adobe.com/t5/coldfusion-discussions/important-notice-upcoming-deprecations-and-removals-in-coldfusion-2025-release/td-p/15034185 Please read through the features which are being removed in ColdFusion 2025 and consider what impacts they may have on your own code and applications. These removals are NOT all in the current Beta build, but will be in Beta 2, dropping at the beginning of January. In the meantime, please review and check so you can plan.
p
<cfinput autosuggest="">
is probably our last YUI holdout, guess we'll have to tack that one now... 🙃 "Script based CFCs" is probably used here too. One question, why is
GetTemplatePath()
going away??
m
It has been deprecated since ColdFusion MX. We figured that was probably long enough. GetBaseTemplatePath, GetCurrentTemplatePath, GetDirectoryFromPath, ExpandPath, also all exist.
p
Totally missed that, I had
GetCurrentTemplatePath()
in my head.
m
Ah! Yeah, totally different function 🙂
p
I blame the head-cold...
m
If we got rid of GetCurrentTemplatePath() there would be riots, and I'd be at the head of them lol
p
Exactly
d
Quoting @gamesover's comment on the Adobe page:
Copy code
What is meant by the vague "Customizing an HTTP response" feature that is going to be removed? I'm not sure if this will affect us or not without more information.
Good question.
👍 1
m
We will no longer allow pinstriping on http responses (sorry lol) Uh, @saghosh or @nimitsharma any ideas on that?
q
@Mark Takata (Adobe) -- is there any details on the
cfscript support for script-based CFCs, such as query and storedproc .
deprecation? Looks like Adobe scrubbed any notes on it from the 2018 release pages, and I'm not 100% sure what that means.
👀 1
g
@quetwo CFDocs may have undeleted examples. For the script-based CFC query, I think you'll need to search your codebase for
new Query(
. https://cfdocs.org/cfquery For scoredproc, maybe just search for the function name
cfstoredproc
. (Not sure if this is correct or not.) https://cfdocs.org/cfstoredproc
q
I know there were others in addition to query and storedproc...
c
Like
new http(
s
@Mark Takata (Adobe) @Dave Merrill https://cfml.slack.com/archives/C06TABBT8/p1734031332589029?thread_ts=1734023915.544649&amp;cid=C06TABBT8 we've updated the post. See Nimit's comment there.
q
ok.... http is one that I actually do use a lot. It's implementation is a TON better than the weird way they did cfhttp
@saghosh the comment response still does not really say what's being removed. WHERE is that status text going away? Result codes from a CFHTTP call? sending it back to the calling page via a cfheader or cfcontent?
m
It is unclear in the table, is the CFMX_Compat algorithm being removed? or just the flag to continue using as default? As far as I know there was never a deprecation notice for the algorithm.
q
@Matt Jones -- it's gonzo. It's in the table of "Will be removed in CF 2025"
m
@quetwo their justification implies that they are talking only about the flag, which is consistent with what was communicated when the flag was added. Additionally, the 'Alternatively, use any of the algorithms listed in the Encryption function doc' in essence is telling you to explicitly define your algorithms from the documented ones, which includes cfmx_compat.
m
It is being removed. It is going away. @saghosh can we clarify that in the text?
s
yes, we can do that.
please check the post in about 30 mins.
d
Is there any further info on how to find uses of
cfscript support for script-based CFCs, such as query and storedproc
in our code?
c
You could browse the ColdFusion folder where those cfc's are located, note the various file names, and then search your code for any instances of
new xxxx(
using those filenames (minus the cfc extension) in place of 'xxxx'.
g
@quetwo You indicated that Adobe was scrubbing things from their documentation? This isn't good. Adobe should fork and create a new version so at to not negatively impact anyone that isn't using the "latest" version. If not, perhaps provide a downloadable version of the documentation that includes all of the information to be removed. If not, some maintainers of older CFML may find it easier to port to a different language rather than attempting to guess how to continue working with their existing codebase.
q
@gamesover -- well, more it's that any docs they had from previous versions of CF didn't make it over when they updated their website. So, the list of deprecated functions and workarounds they published from 2018 isn't there anymore.
g
@Matt Jones I searched my CFML codebase and identified some third-party library usages of the hash() function that used
CFMX_Compat
. Upon review, it returns the same value as the "md5" algorithm. I searched the Lucee source code on Github and determined that their hash function does the same thing. (I wish I could know for sure what the ACF logic does, but I continually find myself deferring to the Lucee source in its absence.)
Copy code
if ("cfmx_compat".equals(algorithm)) algorithm = "md5";
m
@gamesover md5 algo isn't available for encrypt/decrypt, I'm going to update the code, but it's mostly in a bunch of code I hadn't touched before (except to add the explicit cfmx_compat because of the change to the default). I don't mind them changing it, I just think they should have marked the algorithm deprecated first; their current deprecation workflow states 2 releases from deprecation to removal, and it's still not identified as deprecated, in fact it's still incorrectly identified as the default.
g
@Matt Jones Sorry... You are correct. If you need support for encrypt/decrypt using "CFMX_COMPAT", Barney Boisvert shared some UDFs back in 2005. (I believe that these use the same exact algorithm.) https://www.barneyb.com/barneyblog/2005/10/28/cfusion_encryptcfusion_decrypt-udfs/
m
@gamesover Nice, I'll give those a try next week, thanks. At least one of the places I found uses it where the key is neither stored, or in code, the user provides their key to decrypt when they need to see it, since I don't have the key, I won't be able to port it without the user opening it.
d
Re the
cfscript support for script-based CFCs, such as query and storedproc .
deprecation, am I to understand that there's just no cfscript version of these tags any more? Code has to be rewritten in tag syntax, or we need to write our own cfscript wrapper for the equivalent tags? Can I ask why? In other deprecation cases there are security reasons, or supporting technology no longer allows it, but this seems like it's just "cleanup" with no other justification. I'm all for cleaning house, but doesn't this remove useful functionality?
m
@Dave Merrill the versions like
new query() and new storedproc() or createObject('component', 'storedproc') are going away.
instead, you would be using
queryExecute(sql, params, options) and cfstoredproc( your arguments ) { your procparams }
@Dave Merrill for cfhttp, if you look at cfdocs, https://cfdocs.org/cfhttp the example for 'alternate script syntax cf9+' is going away, the others are valid
d
I understand that they can be rewritten to work in cfscript, and my post was sloppy. It's just that the API is totally different, so the code has to be rewritten -- setName(), setDBType(), setAttributes(), etc, all gone. And I still haven't heard a "why".
m
not really sure, I just knew when they deprecated them as part of the 2018 release. I don't think i had seen anybody use them on anything except mail or http in over 10 years. but, since they are just implemented as cfcs, you can probably grab the folder from WEB-INF\cfusion\CustomTags\com\adobe\coldfusion and keep using them
c
They have had unpatched bugs in them for many years, and there may be security flaws with them too. Adobe had abandoned them and ignored or "will not fix" several tickets on the cfc-based scripts long before they were formally deprecated.
d
OK, got it.
m
Yeah. Full disclosure: I actually liked the "old" version (the deprecated one) better, but by the time I got here, everything was already in there and had been setup for removal. Now I'm used to the new way of doing it finally. Carl is exactly right, there's just bugs and it has been deprecated so long that catching them up is just not worth the effort since we've focused on the new way for like 7 years now.
1
t
This question wasn't ever addressed, but I have it too:
WHERE is that status text going away? Result codes from a CFHTTP call? sending it back to the calling page via a cfheader or cfcontent?
So
cfheader( statusCode: 200, statusText: "OK" )
is going to ignore the statusText now... Does that also mean that
CFHTTP.statusCode
is now going to return
200
instead of
200 OK
?
🤔 1
q
Tim -- I'm /assuming/ that it's just the
statusText
in the
cfheader
. That went away in Lucee about 2 years ago, BUT the deprecation document is so clumsily worded, it could mean more.
t
The part that makes me wonder is that I've always figured that cfhttp.statuscode is just statuscode + statustext. if that's true and statustext goes away, that would make all of my
if( cfhttp.statuscode == "200 OK" )
code need to be rewritten.