http://coldfusion.com logo
Join Slack
Powered by
# cfml-general
  • f

    fmdano

    05/09/2025, 1:02 PM
    question to everyone....in application.cfc file, there is a global error handler....if that is setup and has a file in there, should it catch ALL errors that are not trapped locally with say try/catch, OR are there any errors that the global error can't catch? right now one of my team members says he had to or we have to put try catch around ALL functions, so we have to fix over 1000 functions.....any thoughts?????
    z
    n
    +5
    • 8
    • 54
  • b

    Bill Nourse

    05/11/2025, 11:55 PM
    I just read a recent article by Raymond Camden on how to create an API, which is great. He talks about a typical use case that uses URLs like this... yourdomain.com/api.cfc?method=getcats Okay, it works. But what if you want friendly URLs and the ability to respond with JSON, XML, or HTML? Something like this... yourdomain.com/getcats yourdomain.com/getcats?name=barney Well you can... by creating a route using a little rewrite magic in a CommandBox rules file... "regex( '^/getcats$' ) -> rewrite( '/getcats/controller.cfm' )" But what if you don't want to use URL parameters?... yourdomain.com/getcats/barney You can make that work too... with an additional rewrite... "regex( '^/getcats/([a-zA-Z0-9_-]+)/?$' ) -> rewrite( '/getcats/controller.cfm?name=$1' )" In both cases, the request is routed to /getcats/controller.cfm which can handle your GET, POST, PATCH, and DELETE requests. Of course, a production API is more involved, but the core does not have to be complicated. Happy Mother's Day
    s
    b
    +2
    • 5
    • 19
  • b

    Bill Nourse

    05/12/2025, 11:07 PM
    More about URL rewrites from yesterday... In other words, friendly URLs such as mydomain.com/my-slug-here CFML engines such as ACF, Lucee, and BoxLang do not offer URL rewrites out of the box. Nor do any popular CF frameworks such as FW/1, ColdBox, or CFWheels... As rewrites are optional. So if you want friendly URLs, you need to use URL rewrite patterns in your web server. There is no other way. That is, without some kind of hack. For me, the first step to writing modern CFML code is to avoid exposing index.cfm, or anything ending in .cfm for that matter. With some simple rewrite magic, you really don't have to. From there you can build any modern web-facing app, website, or API using CFML. Hope that helps someone.
    r
    b
    +3
    • 6
    • 6
  • s

    sknowlton

    05/12/2025, 11:43 PM
    Commandbox does this easily
  • s

    Slackbot

    05/14/2025, 5:43 PM
    This message was deleted.
    b
    m
    +2
    • 5
    • 18
  • w

    websolete

    05/16/2025, 12:34 AM
    i don't keep up with it as well as i should, i suppose, but do the most recent versions of acf/lucee/boxlang support function overloading?
    b
    b
    z
    • 4
    • 10
  • d

    David Johnson

    05/16/2025, 6:08 PM
    Is there a known way to run the PROPFIND method with CFHTTP? I've done this: <cfhttp url="https://example.com/webdav/" method="PROPFIND"> <cfhttpparam type="header" name="Depth" value="1"> <cfhttpparam type="xml" value='<d:propfind xmlns:d="DAV:"><dallprop/&gt;&lt;/dpropfind>'> </cfhttp> But I get HTTP Method PROPFIND not supported. Thanks!
    p
    a
    • 3
    • 4
  • p

    PK

    05/19/2025, 4:35 PM
    I have a question about a strange happening with commandbox that started last week. My application makes a lot of ajax calls to cfcs. Just this past week the ajax calls all started giving this 500 error only in the commandbox development environment, not on production or standard installs.
    500 Function getClosedDays does not support fuseaction as an argument in C:\Projects\fitnesscollective-v1\fitnesscollectivept_v1\scheduler\components\fullcalendar.cfc
    The ajax url was a get to the following URL:
    <http://127.0.0.1:49456/scheduler/components/fullcalendar.cfc?method=getClosedDays&clientID=0&start=2025-05-18T00%3A00%3A00-07%3A00&end=2025-05-25T00%3A00%3A00-07%3A00>
    The get was made from this URL:
    <http://127.0.0.1:49456/scheduler/index.cfm?fuseaction=sessions>
    This one has me baffled. I've pulled up other apps and they're doing the same thing. I've tried different browsers and it's the same result. Any ideas?
    r
    d
    +2
    • 5
    • 20
  • n

    nickg

    05/19/2025, 5:07 PM
    Hi All. We've had a similar issue to the one mentioned above - ajax calls to cfcs breaking in a few cases. We're testing but my question is whether the jvm argument fix (Dcoldfusion.runtime.remotemethod.matchArguments=false) can be handled one a site by site basis (similar to another recent upgrade where the flag could be set in Application.cfc). So, we'd ideally like to use the latest update as is, but then use a flag on a site by site basis to role back this one arguments matching item on specific sites. Anyone try that?
    s
    c
    • 3
    • 36
  • s

    salted

    05/20/2025, 1:07 AM
    Any AWS oriented devops people online by chance?
  • s

    salted

    05/20/2025, 1:08 AM
    Trying to deploy via github to ecs and getting an error referencing a problem in code that isn’t there in the repo
    g
    q
    • 3
    • 4
  • t

    Tim Badolato

    05/21/2025, 9:21 PM
    PSA: The CFWheels channel is back with a new name #C08T44E333L
    👍 3
  • c

    Cristobal

    05/22/2025, 11:59 AM
    Stay tuned; we'll share the full video with you soon. Make sure to follow us on LinkedIn to stay updated: https://www.linkedin.com/posts/ortus-solutions-corp_cfcamp-cfcamp-boxlang-activity-73[…]m=member_desktop&amp;rcm=ACoAAAFH4HIBrL2ervOmC0dsaK0tcIlUvFfwPl4
  • c

    cfsimplicity

    05/22/2025, 4:11 PM
    Spreadsheet CFML users: you can now read a spreadsheet into an array instead of a query, should you so wish. https://blog.simplicityweb.co.uk/141/reading-a-spreadsheet-into-a-cfml-array
    🙌 5
    🙌🏼 1
  • a

    alholden

    05/22/2025, 10:52 PM
    CF2023 Update 14 applied but not fixing this - cfhtmltopdf is not creating any output or writing a file. This is in the logs: Cannot invoke "String.equalsIgnoreCase(String)" because "engine" is null
    b
    c
    c
    • 4
    • 9
  • a

    alholden

    05/22/2025, 11:01 PM
    image.png
  • a

    alholden

    05/22/2025, 11:03 PM
    image.png
  • a

    alholden

    05/22/2025, 11:19 PM
    stackTrace.txt
    stackTrace.txt
  • n

    nick

    05/23/2025, 12:13 PM
    Anyone on CF 2021 that hasn't yet applied update 20 - if you ever pass more arguments to a function that you explicitly declare with your cfargument - watch out for this: https://stackoverflow.com/questions/79634267/how-to-fix-function-functionname-does-not-support-argumentname-as-an-argumen
    👍 1
    👀 1
    d
    l
    • 3
    • 5
  • a

    alholden

    05/26/2025, 9:10 PM
    I was wondering if any of these "known issues" have been resolved yet. Clicking on any one of these issue numbers opens the tracker with "no issue found" and the search feature broken. Does anyone here know if CF-4198045 or CF-4211032 are still open?
    r
    • 2
    • 1
  • a

    alholden

    05/26/2025, 9:10 PM
    Our PDFs look nice in 2021 and whack in 2023. (we're on update 14 of Enterprise on Win 2016 server)
  • a

    alholden

    05/26/2025, 10:27 PM
    I've set the PDF Service Manager back to version 1 as a "fix" for now. This changes the value of the engine node from “pdfReactor“ to “WebKit” in /cfusion/lib/neo-document.xml
    m
    m
    • 3
    • 6
  • s

    Steve Logan

    05/30/2025, 11:05 AM
    Here's a fusion-reactor question. Just installed / updated to the latest version (licensed). I can get into the FR Admin fine, and it gives me the link for the instance as http://127.0.0.1:8089/. When I open that link I simply get : This site can’t be reached 127.0.0.1 refused to connect. I did
    netstat -aon | findstr LISTENING
    and don't see anything listening on 8089. The closest is 8501 which is CFAdmin. Any ideas what might be causing this?
    b
    • 2
    • 3
  • g

    Gareth

    06/01/2025, 11:28 PM
    anyone seen this ?
    🎉 1
    d
    t
    • 3
    • 8
  • h

    hemi345

    06/03/2025, 4:42 PM
    Can someone remind me what the CF function is called that will capture a screenshot of a webpage and output an image?
    d
    e
    • 3
    • 4
  • z

    zackster

    06/04/2025, 3:32 PM
    @abram trycf is having problems with this code with anything after acf 2021? https://trycf.com/gist/b0e07b591aa59a7580f76e13d7aaab87/acf2021?theme=monokai works on cffiddle
    a
    b
    • 3
    • 9
  • a

    adwwad afadawdwa

    06/06/2025, 2:39 PM
    Using CF11 with IIS 10 is not possible by wsconfig tool. any idea how to make it work otherwise or is it not possible at all?
    d
    j
    +4
    • 7
    • 7
  • p

    phillipsenn

    06/09/2025, 8:08 PM
    Well, it's finally happened. ColdFusion's type coercion finally got me. I was checking to see if the last two characters equaled "-0" and the following evaluated true: if (right("Dan Marino",2) == '-0') {}
    🤣 2
    b
    t
    • 3
    • 13
  • p

    phillipsenn

    06/09/2025, 8:08 PM
    Because "no" evaluates to false and negative 0 evaluates to false.
  • p

    phillipsenn

    06/09/2025, 8:09 PM
    This is the first time where I've gotten bitten. That I know of.
1...3435363738Latest