http://coldfusion.com logo
Join SlackCommunities
Powered by
# cfml-general
  • z

    zackster

    01/14/2023, 12:01 PM
    https://twitter.com/agentK/status/1614130546581331969
    👍 3
  • a

    agentk

    01/14/2023, 9:30 PM
    Hey all. Just wanted to let everyone interested know that the CFCamp 2023 Call For Papers is now available: https://www.papercall.io/cfcamp2023 Closes on the 15th of March (exact time is in the form), so you'll have a good 2 months to put talk submissions in.
    a
    • 2
    • 1
  • j

    johnbarrett

    01/16/2023, 10:56 PM
    The Hawaii ColdFusion User Group is looking for a speaker to give a talk on MVC & ColdFusion. I would like to have a meeting on the design pattern for regular ColdFusion sites, not using a framework. This will be for our March meeting.
    b
    a
    +2
    • 5
    • 13
  • s

    salted

    01/18/2023, 1:50 PM
    how does DKIM work with cfmail, is it handled at the mail server level or is there a special header we need to send with the mail? We’re using Office 365 as the mail server but I’ve never implemented DKIM with coldfusion anyway
    d
    c
    w
    • 4
    • 3
  • t

    thisOldDave

    01/18/2023, 3:57 PM
    Is this a known issue with ACF
    Query Of Queries syntax error. Encountered "email not in ( select. Incorrect conditional expression, Expected one of [like|null|between|in|comparison] condition,StackTracejava.sql.SQLException
    . The Adobe documentation claims
    NOT IN
    is fine https://helpx.adobe.com/coldfusion/developing-applications/accessing-and-using-data/using-query-of-queries/query-of-queries-user-guide.html (search in conditional) . but I cant get it to fly locally and this gist https://trycf.com/gist/91a2db7d0767096bc1fc9d93f8caba93/lucee5?theme=monokai seems to demonstrate thjat it is fine in Lucee and Railo but not in any version of ACF although I am sure I have used the construct in the past.
    z
    d
    +3
    • 6
    • 10
  • r

    richard.herbert

    01/19/2023, 12:26 PM
    I’m not sure where to raise this so I’m happy to move to a better channel on advice. I’m running CommandBox with multiple Lucee contexts on macOS with Apache and mod_cfml but I’m getting these failures [redacted] from the logs which renders an “Internal Server Error” in the browser.
    Copy code
    [Thu Jan 19 11:18:20.283069 2023] [modcfml:notice] [pid 11049] Handler Pattern Found => .cfm
    [Thu Jan 19 11:18:20.283723 2023] [modcfml:notice] [pid 11049] Pattern Match TRUE: extension [.cfm] matches handler [.cfm]
    [Thu Jan 19 11:18:20.283738 2023] [modcfml:notice] [pid 11049] Handler Pattern Found => .cfc
    [Thu Jan 19 11:18:20.283749 2023] [modcfml:notice] [pid 11049] Handler Pattern Found => .cfml
    [Thu Jan 19 11:18:20.283774 2023] [modcfml:notice] [pid 11049] Printing aliases: [1] found
    [Thu Jan 19 11:18:20.283786 2023] [modcfml:notice] [pid 11049] 1. Alias: [/cgi-bin/] -> [/opt/homebrew/var/www/cgi-bin/]
    [Thu Jan 19 11:18:20.283800 2023] [modcfml:notice] [pid 11049] URI => /index.cfm, filename => proxy:<ajp://localhost/index.cfm?page=dashboard&aId=7ba566594b1c2772f8008c1ac9a853c0>
    [Thu Jan 19 11:18:20.283812 2023] [modcfml:notice] [pid 11049] Request header [Host] => <http://example.com|example.com>
    [Thu Jan 19 11:18:20.283823 2023] [modcfml:notice] [pid 11049] Request header [Connection] => keep-alive
    [Thu Jan 19 11:18:20.283832 2023] [modcfml:notice] [pid 11049] Request header [DNT] => 1
    [Thu Jan 19 11:18:20.283847 2023] [modcfml:notice] [pid 11049] Request header [Upgrade-Insecure-Requests] => 1
    [Thu Jan 19 11:18:20.283858 2023] [modcfml:notice] [pid 11049] Request header [User-Agent] => Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
    [Thu Jan 19 11:18:20.283876 2023] [modcfml:notice] [pid 11049] Request header [Accept] => text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
    [Thu Jan 19 11:18:20.283887 2023] [modcfml:notice] [pid 11049] Request header [Accept-Encoding] => gzip, deflate
    [Thu Jan 19 11:18:20.283897 2023] [modcfml:notice] [pid 11049] Request header [Accept-Language] => en-GB,en;q=0.9,es;q=0.8,en-US;q=0.7,fr-FR;q=0.6,fr-CH;q=0.5,fr-CA;q=0.4,fr;q=0.3
    [Thu Jan 19 11:18:20.283907 2023] [modcfml:notice] [pid 11049] Request header [Cookie] => LUCEE_ADMIN_LANG=en; LUCEE_ADMIN_PW_5.3.4.77_SERVER=6a10b09acc3112eeba7afa420c117257878a4c3ba7ca89f63af39f3ddf09ba11; LUCEE_ADMIN_LASTPAGE=services.datasource; cfid=876215ca-18ba-4520-ae17-8a87b80ce6ee; cftoken=0; JSESSIONID=FHKsPmev45ADw376DKOMBdBYicuUdkTtZIDodSWD
    [Thu Jan 19 11:18:20.283918 2023] [modcfml:notice] [pid 11049] Request header [sec-gpc] => 1
    [Thu Jan 19 11:18:20.283929 2023] [modcfml:notice] [pid 11049] Request header [X-Tomcat-DocRoot] => /Volumes/websites/example.com/
    [Thu Jan 19 11:18:20.283939 2023] [modcfml:notice] [pid 11049] Request header [X-Webserver-Context] => example-com-confl3
    [Thu Jan 19 11:18:20.283948 2023] [modcfml:notice] [pid 11049] Request header [X-ModCFML-SharedKey] => **************
    [Thu Jan 19 11:18:20.283958 2023] [modcfml:notice] [pid 11049] Request header [x-vdirs] => /cgi-bin,/opt/homebrew/var/www/cgi-bin;
    [Thu Jan 19 11:18:20.616301 2023] [proxy_ajp:error] [pid 11049] AH01081: ajp_msg_check_header() incoming message is too big 11704, max is 8192
    [Thu Jan 19 11:18:20.616470 2023] [proxy_ajp:error] [pid 11049] AH01031: ajp_ilink_receive() received bad header
    [Thu Jan 19 11:18:20.616491 2023] [proxy_ajp:error] [pid 11049] [client 127.0.0.1:64568] AH00992: ajp_read_header: ajp_ilink_receive failed
    [Thu Jan 19 11:18:20.616511 2023] [proxy_ajp:error] [pid 11049] (120007)APR does not understand this error code: [client 127.0.0.1:64568] AH00893: dialog to (null) (localhost:8009) failed
    Thoughts or directions to further reading appreciated.
    z
    t
    b
    • 4
    • 35
  • s

    satauros

    01/19/2023, 12:39 PM
    Just dropping a quick question in here. But has anyone ever tried using ChannelListeners (websockets) while using dependency injection? I'm trying to access the bean factory from within the listener, but it keeps claiming that application-scope is not defined 😕.
    c
    • 2
    • 1
  • c

    Charles Robertson

    01/20/2023, 11:03 AM
    Hi everyone I have found that I often have to use:
    Copy code
    <cfinclude />
    When creating cross cfml engine [ACF/Lucee] compatible code. For instance, if you do something like this, you will get a compilation error:
    Copy code
    function GetFrameworksByParam() {
            
            var local = {};
            
            local.frameworkbyparam = {
                var1 = "hello world"
            };
    
            local.szResponse = {};
    
            if(server.keyExists( 'lucee' )){
                local.serializeParam_lucee_object = local.frameworkbyparam;
                local.serializeResponse_lucee = Serialize(local.serializeParam_lucee_object);
                local.szResponse = local.serializeResponse_lucee;
            }
            else{
                local.serializeParam_acf_object = local.frameworkbyparam;
                local.serializeParam_acf_type = "xml";
                local.szResponse = Serialize(local.serializeParam_acf_object, local.serializeParam_acf_type);
            }
            
            
            WriteDump(var=local.szResponse);
    }
    
    GetFrameworksByParam();
    The error occurs because of there are differences between the amount of params that the native method:
    Copy code
    Serialize()
    Can accept. In ACF, it is two params, whereas in Lucee, it is just one param. Differences in param names, if the params are named within the method call, also cause errors. The compiler checks code in every conditional branch. But, if you hide the code in an include, there is no error:
    Copy code
    function GetFrameworksByParam() {
            
            var local = {};
            
            local.frameworkbyparam = {
                var1 = "hello world"
            };
    
            local.szResponse = {};
    
            if(server.keyExists( 'lucee' )){
                local.serializeParam_lucee_object = local.frameworkbyparam;
                include "includes/serialize-lucee.cfm";
                local.szResponse = local.serializeResponse_lucee;
            }
            else{
                local.serializeParam_acf_object = local.frameworkbyparam;
                local.serializeParam_acf_type = "xml";
                include "includes/serialize-acf.cfm";
                local.szResponse = local.serializeResponse_acf; 
            }
            
            
            WriteDump(var=local.szResponse);
    }
    
    GetFrameworksByParam();
    includes/serialize-lucee.cfm
    Copy code
    <cfset local.serializeResponse_lucee = Serialize(local.serializeParam_lucee_object) />
    includes/serialize-acf.cfm
    Copy code
    <cfset local.serializeResponse_acf = Serialize(local.serializeParam_acf_object, local.serializeParam_acf_type) />
    Am I correct in thinking that CFML application servers don't check code within
    cfinclude
    , at compile time?
    z
    a
    b
    • 4
    • 36
  • j

    johnbarrett

    01/20/2023, 8:58 PM
    The next Hawaii ColdFusion User Group meeting starts in one hour! Today's meeting is on an introduction to ColdFusion APIs. Please join us - https://hawaiicoldfusionusergroup.adobeconnect.com/apis/
    • 1
    • 1
  • j

    Jim Priest

    01/20/2023, 8:59 PM
    When declaring variables in CF do you like 1️⃣ var foo - or - 2️⃣ local.foo I've always preferred local.foo because I don't have to think about it - I know it's scoped regardless of where I see it in the code.
    1️⃣ 10
    a
    r
    +2
    • 5
    • 16
  • d

    Dave Merrill

    01/21/2023, 3:36 PM
    I have a query with ID and Name columns, that I want to "reduce" to a struct whose keys are those IDs and values are the corresponding names. Old school would be to create a struct then loop over or queryEach() the query setting values in it. Nothing wrong with that, just wondering if there's a more modern idiomatic approach. Could do something like this:
    Copy code
    values = queryReduce(qry, function(result={}, row)
    {
    	result[row.ID] = row.Name;
    	return result;
    });
    The 2-line function setting the result key value then returning it seems awkward. Is there a cleaner way?
    j
    a
    • 3
    • 6
  • g

    gavinbaumanis

    01/23/2023, 12:25 AM
    Hi Gang, Can anyone see what I am doing wrong here, please? I am using Lucee 5.3.9.166 MariaDB using the MySQL JDBC I have a string that is SQL. It has a WHERE statement (Taken from a dump of the string)
    WHERE wsq.internalName = 'NPS_response'
    When I pass the string into a cfquery tag
    Copy code
    <cfquery name="theQuery" datasource = "#customer.getDataSource()#" >
        #theLastSQL#
    </cfquery>
    I get SQL errors - where my "where" clause above is "double quoted"
    You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NPS_response''
    Any and ALL quoted strings - end up with an extra set of single quotes. It isn't just this one instance - it is simply the first one - that the error gets caught up on. Thanks.
    p
    w
    a
    • 4
    • 6
  • j

    johnbarrett

    01/23/2023, 1:57 AM
    The next Hawaii ColdFusion User Group for our February meeting Jim Priest is giving a presentation on an Introduction to Docker for ColdFusion developers, Please RSVP here - https://www.meetup.com/hawaii-coldfusion-meetup-group/events/290815799/
    ❤️ 1
    👍🏼 1
  • n

    nickg

    01/23/2023, 4:16 PM
    Hi All. Apologies if this is better mean for beginners channel. We're trying to figure out the best / modern way(s) to restrict direct access to protected pages that are behind other pages in a process (e.g. I search a db via a search form and see results and then click on results to see more details). We don't want users (or bots) to be able to get to the following pages unless they start at the search form first. In the case of protecting pages behind forms, we've been using CSRFGenerateToken. But, this tag seems to be used with forms only. For subsequent pages without a form to pass CSRFGenerateToken, it's not clear how best to protect access to the following pages in the process (short of a pw). Is there a standard / preferred way to do this?
    m
    s
    +2
    • 5
    • 19
  • m

    Michael Gillespie

    01/24/2023, 2:21 PM
    I have been using spoolmail on localhost and have a love/hate relationship with it when the email contains embedded images
    <cfmailparam file="#variables.imgPath#icon-yt.png" contentid="iconyt" disposition="inline" />
    Any tips on either, a) how to modify the display page, or b) an alternative to spoolmail that shows what the actual email looks like.
    e
    m
    +2
    • 5
    • 40
  • s

    Slackbot

    01/24/2023, 5:12 PM
    This message was deleted.
    d
    e
    +6
    • 9
    • 78
  • z

    zackster

    01/25/2023, 12:37 PM
    anyone know of a cfml/java diff util?
    m
    j
    +5
    • 8
    • 12
  • j

    Jim Priest

    01/25/2023, 9:42 PM
    We were talking about ORM at work today and I was curious. I know ORM was hot several years ago but how many people are still using it? I've had mixed experiences with it and not sure I would use it again unless maybe developing a system from the ground up so I could ensure the app/database was designed with ORM in mind.
    b
    s
    +7
    • 10
    • 41
  • a

    abhalani

    01/25/2023, 9:45 PM
    Looking for ideas on a plugin or small app that can be used as a documentation tool to let developers and users document a app for how it works and store info on updates etc?
    b
    g
    +2
    • 5
    • 11
  • d

    Dave Merrill

    01/26/2023, 2:37 PM
    CF 101.1. Within a method, I want to only honor the arguments that were actually declared, not random stuff passed in. I can build a struct out of the name field values in this.someMethod.getMetadata().parameters, then anything that exists in that struct is a declared argument. I can wrap that in a (private probably) method, getDeclaredArgs(required function method) for clarity. Is there a more elegant, less-code way to do this? Not that this is a big pile of code, just wondering. And before folks jump on me for code that may pass random-ish arguments, there's Reasons :)
    w
    a
    • 3
    • 10
  • s

    Scott Steinbeck

    01/26/2023, 5:13 PM
    is it possible to remove array positions with
    arrayMap
    ? The reason for the question is i would like to filter an array of structs and also return a single column while getting the benefits of async
    a
    g
    • 3
    • 30
  • e

    elpete

    01/26/2023, 5:17 PM
    You either need to chain the actions or use something like reduce to do both at once.
  • s

    Scott Steinbeck

    01/26/2023, 5:22 PM
    thats is what i figured, but i thought there might be some creative way to do it by returning null. just seems like a nice use case, but there may also be no performance gain
    a
    • 2
    • 1
  • s

    Scott Steinbeck

    01/26/2023, 5:26 PM
    i guess i could just use a for each
  • a

    Adam Cameron

    01/26/2023, 5:33 PM
    Threads pls.
    🧵 3
  • m

    Mark Takata (Adobe)

    01/26/2023, 7:24 PM
    image.png
    😆 1
    🤣 5
    g
    a
    • 3
    • 11
  • z

    zackster

    01/26/2023, 9:12 PM
    <cfthread action="join">
    😆 2
    🎯 1
  • d

    Daniel Mejia

    01/27/2023, 2:30 AM
    How can I call a method of an object by using a variable whose value string is the name of the method?
    s
    a
    +3
    • 6
    • 34
  • m

    Michael Gillespie

    01/27/2023, 9:32 PM
    Is this a thing? I', in the process of upgrading from ACF2016 to 2021 and during testing I found this.. I have 3 mysql DB fields, total, tax, shiptotal. All defined as DECIMAL(12,2) When I query the row, and then, in CF, add them together
    grandTotal=val(h.total)+val(h.tax)+val(h.shiptotal);
    when serializing the total to send back in Ajax I get "847.8100000000001" but when I output it to page or cfdump the result I get 847.81, as expected.. edited to add, in ACF2016
    b
    s
    • 3
    • 26
  • u

    Umair Khan

    01/29/2023, 4:55 PM
    Trying to intiate Java class but it is saying class not found
    a
    s
    • 3
    • 5
1...262728...38Latest