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

    Paul Giesenhagen

    05/10/2023, 7:11 AM
    Folks, I am struggling getting a new windows 11 pro localhost (development) coldfusion server running IIS 10 to load up and serve cfml pages. I can run a simple .html file, but cfm files end up as template not found. I'm simply installing the latest 2021 and all updates applied. Ran WSConfig so many times, removed jakarta virtual directories and manually creating them. I have verified that default document is index.cfm and when I run the host file record wwwgct.com it gives me a 403 error. If I run wwwgct.com/index.cfm - template not found exception, wwwgct.com/test.HTML will load up just fine. So many google searches and I don't know why or any idea where else to look. If you have any questions I would appreciate the help.
    a
    b
    e
    • 4
    • 10
  • m

    malpaso

    05/10/2023, 9:13 AM
    Anyone noticing the hype Laravel is getting atm? JS devs are switching to it!!! I wish the CF ecosystem had the marketing nous that the Laravel team has.. https://twitter.com/adamdotdev/status/1655911798233522177?s=20
    a
    e
    +3
    • 6
    • 20
  • z

    zackster

    05/10/2023, 11:33 AM
    heaps up, anyone using https://www.addthis.com/ for projects, our dear friend oracle is killing off the service end of may
    m
    e
    • 3
    • 2
  • g

    gsr

    05/10/2023, 4:45 PM
    trying a soap call after a long time, my question i have a soap api wsdl which when called using the auth gives all the bindings which one of the bindings i have to use to make an extra call to update a record like this tne is the bindings <wsdl:binding name="PersonServiceSoapHttp" type="tns:PersonService"> in the soapUI.org, i can create the wsdl and it list down all the connected bindings and in one CreateService i can create a request and pass the xml bosy to get response just need a start to know how can i approach this back again Tried with cfinvoke with passing the username/pssword and for method, i called CreateService, but i am getting issues like this
    Copy code
    C:\ColdFusion2021\cfusion\stubs\WS_-1209133194_2\src\org\w3\www\_2001\xmlschema\AnySimpleType.java:81: error: cannot find symbol if (local==null){ ^ symbol: variable local location: class AnySimpleType C:\ColdFusion2021\cfusion\stubs\WS_-1209133194_2\src\org\w3\www\_2001\xmlschema\AnySimpleType.java:87: error: cannot find symbol xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local)); ^ symbol: variable local location: class AnySimpleType C:\ColdFusion2021\cfusion\stubs\WS_-1209133194_2\src\org\w3\www\_2001\xmlschema\AnySimpleType.java:277: error: cannot find symbol org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local) ^ symbol: variable local location: class AnySimpleType Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details.
  • g

    gsr

    05/10/2023, 5:18 PM
    interestingly i can't edit the above, so i use cfhttp to call it and got the response and did an xmlparse now i have to call this one its in bindings, if i call it directly when i pass the username/password to it, it says not found, when i do it from the soapUI it works because that is gui based
  • z

    zackster

    05/10/2023, 6:49 PM
    oooh, testbox 5.0 is out https://github.com/Ortus-Solutions/TestBox/releases/tag/v5.0.0 β€’ includes a new
    skip()
    method I proposed https://ortussolutions.atlassian.net/browse/TESTBOX-345
    πŸ‘πŸΎ 1
    l
    b
    a
    • 4
    • 45
  • p

    phillipsenn

    05/11/2023, 5:51 PM
    I need to replace this with it's script alternate:
    Copy code
    <cffile action="Upload" filefield="form.upload_file" destination="#TempUploadPath#" nameconflict="overwrite">
  • p

    phillipsenn

    05/11/2023, 5:52 PM
    I thought I could use:
    Copy code
    cffileupload(destination=TempUploadPath,nameconflict='overwrite')
  • p

    phillipsenn

    05/11/2023, 5:52 PM
    But it's failing the syntax check. I might be climbing the wrong ladder.
    s
    a
    g
    • 4
    • 30
  • j

    Jeff

    05/11/2023, 6:26 PM
    I'm running into a really weird cfquery error. It's like a cfquery block refuses variables to be referenced within, for some reason. If no variables are referenced, the cfquery block executes just fine. If a single variable is referenced, the error indicates the line with the problem is the line the variable is on. Add spacing, the line number changes to match. Add a second variable, the line number changes to reference the second variable. Add a third and it changes to reference the line with the third variable. The specific error is: java.util.NoSuchElementException. However, reference the "offending" variables immediately prior to the cfquery and no error is thrown for those lines (though it'll still throw them for the cfquery). Here's the offending code:
    Copy code
    <cfquery name="getlogins" datasource="#app.datasource#">
      SELECT user_login_log.user_id
           , user_email.email
           , user_login_log.employer_group_id
           , employer.uuid AS employer_uuid
           , employer.company AS employer_name
           , employer_group.uuid AS employer_group_uuid
           , employer_group.name AS employer_group_name
           , employer_group_role.uuid AS employer_group_role_uuid
           , employer_group_role.name AS employer_group_role_name
           , user_login_log.var_id
           , var.uuid AS var_uuid
           , var.name AS var_name
           , var_role.name AS var_role
           , '' AS context_icon
           , '' AS context_string
           , user_login_log.http_user_agent
           , user_login_log.remote_addr
           , user_login_log.http_referer
           , user_login_log.with_mfa
           , user_login_log.is_success
           , user_login_log.is_admin
           , user_login_log.date_created
        FROM user_login_log LEFT OUTER JOIN user_email
          ON user_login_log.user_email_id = user_email.id LEFT OUTER JOIN employer_group
          ON user_login_log.employer_group_id = employer_group.id LEFT OUTER JOIN employer_group_role
          ON user_login_log.employer_group_role_id = employer_group_role.id LEFT OUTER JOIN employer
          ON employer_group.employer_id = employer.id LEFT OUTER JOIN var
          ON user_login_log.var_id = var.id LEFT OUTER JOIN var_role
          ON user_login_log.var_role_id = var_role.id
       WHERE user_login_log.user_id = #Val(url.user_id)#<cfif getloginips.recordcount>
          OR user_login_log.remote_addr IN (#QuotedValueList(getloginips.remote_addr)#)</cfif>
       ORDER BY user_login_log.date_created DESC
    </cfquery>
    I should add that this doesn't throw errors for every value of url.user_id or quoted list of login remote_addr values. It only does it for some. I suspect it has to do it over a certain string length, but can't be absolutely certain.
    m
    a
    +4
    • 7
    • 92
  • d

    dfgrumpy

    05/14/2023, 5:09 AM
    Webocket question. My server is using CF2021. Is it possible to enable websockets to an app but not declare a channel? I am working on something for a 3rd party app to send WS message to my app but it just connects and sends messages. It doesn't have the ability to subscribe to a channel.
    j
    • 2
    • 12
  • g

    gavinbaumanis

    05/15/2023, 7:39 AM
    Hi @channel, with a FOR loop - I have the following;
    Copy code
    for(myElement in myArray) {
    ...
    }
    Is there a way to determine the index? I have dumped "myElement" and just get the type and value. I am trying to create a condition within the loop where If the value = "0" - but only if it is the first element of the array
    Copy code
    for(myElement in myArray) {
        if(the value EQ 0 AND I myArray[0] {
        }
    }
    I can check before the loop with arrayFirst() But then I would need to create two loops for true/false cases. I can change the loop, too to use index / item / to / from... But I thought I would ask if there was someway to get the "metadata" - for interest just as much as a solution. As always - thanks!
    z
    s
    +5
    • 8
    • 30
  • z

    zackster

    05/15/2023, 5:48 PM
    awkward https://twitter.com/Bitfinexed/status/1658167242339524608
    πŸ€” 1
  • a

    Adam Cameron

    05/15/2023, 7:24 PM
    shakes fist @User & his "trycf.com" again. I mean it's been about six months. πŸ˜‰
    😞 1
  • m

    mbh

    05/17/2023, 5:10 AM
    Adding some functions to help me simplify JSONL files/data, Figured id share what I came up with that has worked thus far and see if anyone has suggestions or UDFs they use to manage JSONL data.
    Copy code
    function jsonlToArray(jsonl) {
    		var result = [];
    		var lines = listToArray(jsonl, chr(10));
    
    		for (var line in lines) {
    			result.append(deserializeJSON(line));
    		}
            
    		return result;
    	}
        
        function isJSONL(content) {
    		
    		// Split the file contents by line
    		lines = listToArray(content, chr(10));
    		
    		// Check that each line is a valid JSON string
    		for (i = 1; i <= arrayLen(lines); i++) {
    
    			if (!isJSON( lines[i].trim() ) ) {
    				return false;
    			}
    		}
    		
    		// If we made it this far, it's a valid JSONL file
    		return true;
    	}
    z
    a
    • 3
    • 2
  • z

    zackster

    05/17/2023, 10:56 AM
    where is that mirror of all cfml slack posts again? https://cfml.slack.com/archives/C06TA0A9W/p1684320649010159
    c
    a
    r
    • 4
    • 7
  • g

    gert

    05/17/2023, 1:52 PM
    BTW, if anyone is interested. There is another PHYSICAL conference happening soon. Yes, they do happen. And it is cfcamp.org in Munich. Many folks there including the Lucee and the Ortus folks, as well as Ben Nadel πŸ™‚
    πŸŽ‰ 1
    πŸ‘ 1
    ❀️ 5
    z
    b
    +2
    • 5
    • 4
  • s

    Simone

    05/17/2023, 5:06 PM
    I am getting my data from sql server and i am having trouble when i am trying to send back a proper json format, going to use in datatables
    Copy code
    {"draw": <cfoutput>#val(draw)#</cfoutput>,
    "recordsTotal": <cfoutput>#recordsTotal#</cfoutput>,
    "recordsFiltered": <cfoutput>#qFiltered.recordCount#</cfoutput>,
    "data": [
    <cfif qFiltered.recordcount gt 0>
    <cfoutput query="qFiltered" startrow="#val(start+1)#" maxrows="#val(length)#">
        <cfif currentRow gt (start+1)>,</cfif>
            #Replace(SerializeJSON(qFiltered,'struct'),'\','','all')#,
    </cfoutput> 
    <cfelse>
        ""
    </cfif>
    ]
    }
    someehow the code is ending in invalid nested data, not sure what i am doing wrong here
    m
    a
    +4
    • 7
    • 90
  • d

    Dean Lawrence

    05/18/2023, 2:40 PM
    I am having an issue with encrypting/decrypting a string which I am hoping someone can shed some light on. In an old ModelGlue app I have created an encrypted string which is a combination of a 6 digit numeric id number, a pipe symbol, and a numeric mailing code. I am using the following code to do so:
    Copy code
    <cfset unsubscribeValues = MailingListID & "|" & mailingNum />
    <cfset unsubscribeVars = encrypt(unsubscribeValues, encryptKey, "AES/CBC/PKCS5Padding", "HEX") />
    And adding as a link in my emails.
    Copy code
    <a href="#domain#/unsubscribe?v=#encodeForURL(unsubscribeVars)#">Unsubscribe</a>
    When someone clicks the unsubscribe link, I am using the following code to decrypt the string.
    Copy code
    <cfset var unsubscribeVars = decodefromUrl(arguments.event.getValue("v")) />
    <cfset var unsubscribeValues = len(unsubscribeVars) ? decrypt(unsubscribeVars, encryptKey, "AES/CBC/PKCS5Padding", "HEX") : "" />
    Half the times that someone tries to unsubscribe, it works fine. The other half though, it throws an error when trying to decrypt the string with the following error: An error occurred while trying to encrypt or decrypt your input string: Given final block not properly padded. Such issues can arise if a bad key is used during decryption. Both encrypt/decrypt functions are using the same key. Am I doing something wrong? Is there a better way to do this? Any help would be appreciated.
    b
    m
    • 3
    • 9
  • j

    Joshua Rose

    05/18/2023, 3:04 PM
    Hey folks I've got a json object returning enormously long names for fields that deserialize fine but when I ask structKeyExists(jsonobj,'superlongfieldnamewithwaytomuchinformation'). What is the limit on the key name and anyone find a work around (this one is 46 characters long).
    m
    a
    • 3
    • 36
  • v

    Vimlesh Parihar

    05/19/2023, 9:33 AM
    "Reason: Remote host said: 501 5.1.7 Invalid address [BN8NAM11FT078.eop-nam11.prod.protection.outlook.com" I am getting this error as failed mail delivery. Can anyone tell me why I am receiving this response? I think might me the mail server not give permission to send and recieve the mail from outlook.
    z
    a
    e
    • 4
    • 7
  • v

    Vimlesh Parihar

    05/19/2023, 9:51 AM
    Should I make changes to the from and To the email format for email address?
    z
    • 2
    • 1
  • m

    Mark Takata (Adobe)

    05/19/2023, 2:53 PM
    Hey, who is the owner of this Slack? I just noticed an issue with my account...
    a
    • 2
    • 2
  • d

    Dave Merrill

    05/19/2023, 7:18 PM
    Bet I know the answer to this, but there's no magic flag/QoQ setting to make QoQ NOT case sensitive, is there? State of the art is WHERE UPPER(sqlValue) = uCase(valueToSearchFor)?
    b
    t
    +2
    • 5
    • 8
  • w

    websolete

    05/22/2023, 3:10 PM
    is it a known behavior that fileDelete will work on directories (empty) as well as files? i wouldn't have expected it to work, and have never even given it any thought, but it seems that it's so. was just wondering if i just missed the memo. this is on windows fwiw. have confirmed it under cf10 as well as lucee 5.x
    b
    z
    • 3
    • 2
  • b

    Brian

    05/22/2023, 8:28 PM
    I really hate to ask this, but...will MS Graph/OAuth 2 authentication work with pauses awkwardly ACF 11?
    s
    t
    • 3
    • 5
  • z

    zackster

    05/23/2023, 10:17 AM
    anyone seeing 404s for iEdit.cfc, it's due to this https://cve.report/qid/730794
  • m

    Mark Berning

    05/23/2023, 5:19 PM
    Based on some comments here in SLACK. I have attempted to not build JSON by hand (@Adam Cameron) and instead built a structure first and then used serializeJSON, BUT..... I want to preserve case of the key/names and specify a numeric data type at the same time. And I get an error when doing that.
    Copy code
    <cfset date = "05/10/2023">
    <cfset hoursPerDay = 4.0> <!--- should be numeric --->
    <cfset data = $[Schedule_Date = date, Schedule_Hours = hoursPerDay]> <!--- I want Schedule_Date and Schedule_Hours to be case sensitive not converted to uppercase ---> <!--- shortcut for case sensitive structure ${ --->
    <cfset metadata = {Schedule_Hours:"numeric"}>
    <cfset data.setMetadata(metadata)>
    <cfoutput>
    #serializeJSON(data)#
    </cfoutput>
    get this error:
    Copy code
    An exception occurred while calling the function setMetaData.
    Cannot cast coldfusion.runtime.OrderedCaseSensitiveStruct to coldfusion.runtime.Struct
    If you want me to show the non-implicit struct format and/or script based method I can, but get the same error regardless. You can not serialize a case sensitive structure and set the metadata to be numeric at the same time. Also this is in a component and the hoursPerDay is passed in as a numeric cfargument, it is not a simple 4.0 shown above.
    s
    t
    +3
    • 6
    • 56
  • v

    Vimlesh Parihar

    05/24/2023, 10:24 AM
    is there any jquery code that can run .avi file format in html5
    a
    • 2
    • 2
  • d

    Dave Merrill

    05/24/2023, 9:24 PM
    How can I offer an Excel download (content built by cf) that asks the user for the filename and location to save? I've used this:
    Copy code
    <cfcontent type="application/msexcel" reset="yes"><cfheader name="Content-Disposition" value="attachment; filename=#fileName#"><cfoutput>#reportData#</cfoutput><cfabort>
    But in current Chrome it just saves with that filename, in the user's default Downloads directory. Content-Disposition value of attachment or inline acts the same. If I don't pass a filename it uses the URL filename. Have the gods of internet decided that a user-selectable file name and location is no longer a thing? Am I missing something obvious?
    r
    a
    • 3
    • 6
1...3435363738Latest