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

    websolete

    03/09/2022, 2:28 PM
    is there a preferred way to destroy a variable nowadays during the request lifecycle? say i have some stuff going on in the pseudoconstructor area of application.cfc and i'm creating a variables-scoped variable named 'temp' which does a handful of things, then i don't need or want it anymore, is there a preference or advantage one way or another of doing
    temp = javacast("null","")
    vs
    structdelete(variables,"temp")
    ?
    b
    a
    d
    • 4
    • 21
  • g

    gobwash

    03/09/2022, 6:50 PM
    looking for suggestions. I'm sure this is something tiny I'm overlooking...setting up a new CF2021 server. copied the source from a known "good" instance. exported/imported CF settings from the same server. i get this error message "The init package method in the FILE2r.cfc component cannot be accessed from FILE1.cfc." for any component that instantiates another component. the files are in the same folder in each case and, of course, the code works on the original (multiple) servers. i've even turned off all caching options and cleared the saved classes.
    d
    • 2
    • 3
  • n

    Nicole Liliana

    03/10/2022, 1:08 PM
    Hy everybody CacheBox question, i need to put one view in cache, the CacheBox create an object in the region, when users see the view, they “use” the same object or there are many objects with the same view? PS. Sorry for the english, i’m not very good at writing
    b
    • 2
    • 2
  • b

    bhartsfield

    03/10/2022, 9:01 PM
    Before I dive into it, I'm curious if anyone else has written or used something in CF to parse an odata $filter string (accounting for all the basic operators like and, or, eq, ne, gt, lt, like as well as nested parentheses)
    • 1
    • 1
  • m

    Michael Dawson

    03/11/2022, 12:59 AM
    I noticed an issue with null support in CF2021. I am hoping someone else can confirm this behavior in their environment. ColdFusion 2021,0,03,329779 In Application.cfc, I have enabled null support. I have the following code samples:
    Copy code
    x = null;
    if (x != null) {}
    Using this code in a normal template, or an included template, works as expected. 🙂 Using this code in a CF custom tag results in the exception: Variable NULL is undefined. 🙁 It does not matter if the code is used in tag syntax or a script block.
    d
    m
    • 3
    • 8
  • z

    zackster

    03/11/2022, 8:20 PM
    Who wants to add cfml? https://curlconverter.com/
    j
    s
    • 3
    • 10
  • m

    Michael Dawson

    03/11/2022, 10:55 PM
    More "null" support wackiness. I have a database table with a nullable column: "photoUrl". I have the following code which does nothing:
    <cfif !isNull(article.photoUrl)>...</cfif>
    No matter what, that cfif statement always returns true. If I change it to:
    <cfif article.photoUrl != null>...</cfif>
    Lo and behold, it works as expected. Maybe I misunderstand the meaning of the isNull() function.
    a
    • 2
    • 2
  • d

    Dave Merrill

    03/11/2022, 11:30 PM
    This afternoon one of our production apps suddenly started throwing this exception, a lot, on a template that's used by most pages: Element EXECUTIONMODE is undefined in THISTAG. No files had changed on that server since mid-day yesterday, and the app is in constant use, mostly without problems. It smelled to me like a template got corrupted in memory, so I restarted the CF service (cf 2018 win), and that fixed it. Has anyone run into such a thing? Any ideas on prevention?
    a
    • 2
    • 2
  • p

    Patrick S

    03/11/2022, 11:32 PM
    I'm trying to set session or cookie's in an iframed form page, and it looks like it is forgotten the moment the parent page is reloaded. When outside of the iframe, cookies and session are maintained. I've got sessionmanagement on in the application.cfc, is there something else I need to do on my side, or do I need to get some sort of cross-site policy changed with the parent page?
    d
    • 2
    • 4
  • p

    pauls

    03/12/2022, 2:51 AM
    ColdFusion 2021 question: has anyone been able to get the ODBC services to start? If so, how?
    d
    • 2
    • 2
  • a

    Adam Cameron

    03/13/2022, 1:08 PM
    @bdw429s what's your opinion of this behaviour (either platform): https://trycf.com/gist/7247e6a46178f1a9cc15164d5b2c0e51/acf2021?theme=monokai To me, it's a fundamental of a mapping operation that the result type should be the same as the object being mapped. Or is this just something on the periphery of CFML's "partial" (or just "poor") implementation as a JVM language that means it's legit for the type to be changed to the "native" type here?
    l
    d
    +2
    • 5
    • 9
  • d

    Dave Merrill

    03/15/2022, 1:33 PM
    Zero 🙂 ...which I'm sure isn't helpful info. We're not using TestBox.
    j
    a
    l
    • 4
    • 5
  • f

    fmdano

    03/15/2022, 1:44 PM
    Hey all, what is the best way to send SMS with CF? if it is Twilio, is that simple to setup? is there already CF components created to use Twilio if that is the best....how easy it is to se up twilio? IF Twilio not the best, what might be best.....THANKS
    a
    m
    +4
    • 7
    • 26
  • d

    Dave Merrill

    03/15/2022, 3:29 PM
    Really really dumb question. I'm working on a bit of code that includes this: <cfqueryparam value="#arguments.updatedbyid#" cfsqltype="CF_SQL_INTEGER" null="#arguments.updatedbyid EQ this.badnumber#"> It's currently throwing this error: Invalid data '' for CFSQLTYPE CF_SQL_INTEGER. But if I put this on the line before that: <cfthrow message="arguments.updatedbyid=#arguments.updatedbyid#"> Then it throws this: arguments.updatedbyid=1234 That error makes sense, that's the integer value I expect. It should NOT throw "Invalid data '' for CFSQLTYPE CF_SQL_INTEGER ". I've restarted cf, in case it was lost in the weeds for some reason, though things seem fine otherwise. I also tried removing the null="..." bit, though it should be fine as is, no change. (This isn't the same server or even cf version as my last ghost in the machine, in case you're wondering...) Am I missing something obvious?
    w
    c
    +2
    • 5
    • 29
  • z

    zackster

    03/15/2022, 6:28 PM
    just was reading thru the mysql jdbc driver release notes, 8.0.27 has some new (odd imho behavior) The
    ResultSet.getBoolean()
    method now returns `true`/`false` for
    VARCHAR
    values of “T”/“F”. (Bug #33185116)
    a
    d
    • 3
    • 3
  • r

    ryan

    03/17/2022, 2:57 PM
    This is a round-about CFML question, but not really and apologizing up front if this is in the wrong channel. I have come across code related to Authorize.net, which uses Authorize.net's transact.dll in a CFHTTP call within a CFC. The CFC is called from a post form on a CFM page where the merchant employee enters the sale on the form page. Basically, the data from the credit card and transaction information is passed to this CFC and the CFC grabs the API Login ID and Transaction Key depending on the client logged in and then sends the transaction data with the API Login ID and Transaction Key to Authorize.net. This process keeps the API Login ID and Transaction Key from ever reaching the web page and secured. Due to PCI Compliancy concerns, my client wants to cut out the call to the CFC and post directly to Authorize.net to reduce PCI Compliancy stickiness. The trouble is that in order to have the web form post directly to Authorize.net, then the API Login ID and Transaction Key would essentially have to remain in a hidden input field and would be able to be viewed in the source code of the web page, which is definitely not ideal. Has anyone experienced this sort of conundrum? I know that there is Accept.js, but the client allows for card swipes and the website captures track data which Accept.js is not able to handle track data.
    s
    s
    a
    • 4
    • 19
  • s

    satauros

    03/21/2022, 10:15 AM
    When restarting our ColdFusion 2016 instance I get the following error:
    ERROR Flash upgrade server could not be started.
    Any idea on how to get rid of this error ( or finding the source of this error?).
    • 1
    • 1
  • o

    Oz Coruhlu

    03/21/2022, 8:33 PM
    Copy code
    <cfform class="searchform" method="post" role="search" action="/gcrm/dashboard/" >
          <div class="input-group">
          <cfinput name="name" type="text" autosuggest="cfc:autosuggest.findContact({cfautosuggestvalue})" matchContains="true"  class="form-control"  placeholder="Search Client(Phone/Name)"/>
     <span class="input-group-btn">
            <button class="btn btn-primary" type="submit"><i class="fa fa-search"></i></button>
          </span>
           <input type="hidden" name="searchit" value="yes" />
            </div>
     </cfform>
    m
    a
    a
    • 4
    • 38
  • r

    Ryan Albrecht

    03/22/2022, 1:40 PM
    anyone have any experience in getting coldfusion to ingest MQTT messages?
    r
    s
    • 3
    • 16
  • s

    Simone

    03/22/2022, 2:12 PM
    Hi, I am installing CF 2021, I want to map a network drive as a wwwroot so, i can do my work on that network drive and check it on my local because database i have on my local
    d
    • 2
    • 1
  • s

    Simone

    03/22/2022, 2:13 PM
    do i need to install CF on IIS or standalone will work
    t
    r
    p
    • 4
    • 3
  • n

    nickg

    03/22/2022, 4:52 PM
    Hi All. We're being asked to run a daily script to hit an API to check for new employees. Here is the API: https://manage.greymar.io/Documentation/View In using CF to call their API, would you use <cfoauth> or something else? I'm just trying to get a sense of the standard or best way to handle something like this. Thanks in advance!
    m
    t
    t
    • 4
    • 31
  • s

    satauros

    03/22/2022, 5:43 PM
    Does anybody have a good replacement for cftree? One of our old CF10 instances still uses this, but it doesn't work well with our Checkpoint Mobile portal. Any suggestions on good alternatives?
    m
    • 2
    • 3
  • a

    Adam Cameron

    03/22/2022, 7:12 PM
    Am I correct in that CFML doesn't support import aliasing?
    Copy code
    import com.example.SomeThing as ExampleSomething
    import me.adamcameron.SomeThing as AdamSomething
    e
    • 2
    • 5
  • g

    gus_dancy

    03/22/2022, 11:17 PM
    So I have a form with a cfdiv in it that changes the 2nd select box when you change the first select. But when the form submits the field that is in the cfdiv value doesn't get passed in the form object. I believe this used to work maybe years ago.
    d
    m
    • 3
    • 10
  • w

    websolete

    03/23/2022, 2:18 AM
    would love to see an example of what you're referring to so that justice may be done.
    c
    b
    j
    • 4
    • 5
  • m

    mauzer

    03/23/2022, 11:10 AM
    What is the right <cfqueryparam> syntax when your evaluating a null ? SO for example. I have this query below and need to wrap a <cfqueryparam> statement around it: <CFQUERY NAME="application.argocond" DATASOURCE="newservinform"> Select ID_argo_cond, chiavi from tbl_argo_cond where chiavi <> NULL or chiavi <> '' order by chiavi </CFQUERY>
    t
    a
    +2
    • 5
    • 5
  • t

    Tim

    03/23/2022, 2:53 PM
    I've got a weird one today. If I run the following code in Coldfusion 2021 on my server, I get a broken image. If I run the same code on CF2018, it displays the image as expected. If I run this code in cffiddle (trycf doesn't support cfcdocument) on CF2021, it works fine. If I switch out the image url for a different one (

    https://upload.wikimedia.org/wikipedia/commons/3/3a/Cat03.jpg▾

    ), it works fine on my server. If I download the original image, and put it at a different URL, it also works fine. Does anyone have any thoughts on how to debug this problem?
    Copy code
    <cfdocument format="pdf">
    	<img src="<https://issc.asu.edu/sites/default/files/2022-03/Letterhead%20header.jpg>">
    </cfdocument>
    a
    m
    +3
    • 6
    • 19
  • p

    pauls

    03/24/2022, 2:51 PM
    Cannot recreate the web server connector on ColdFusion 2021 with Apache 24 web server. After installing update 2 attempting to remove it fails and throws a "Could not determine Apache control script file" error. Any ideas?
    m
    • 2
    • 3
  • j

    jcarp

    03/24/2022, 6:45 PM
    ACF 2016 is timing out generating larger PDF files using cfhtmltopdf with message "PDF conversion is failed due to timeout. Increase the timeout value in PDFgService manager settings." Does anyone know where this is in ACF 2016? I am looking in cfinstance/jetty/webapps but this directory is empty. Trying to find configuration settings for PDFgService.
    b
    m
    +3
    • 6
    • 34
12345...38Latest