Paul Giesenhagen
05/10/2023, 7:11 AMmalpaso
05/10/2023, 9:13 AMzackster
05/10/2023, 11:33 AMgsr
05/10/2023, 4:45 PMC:\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.
gsr
05/10/2023, 5:18 PMzackster
05/10/2023, 6:49 PMskip()
method I proposed https://ortussolutions.atlassian.net/browse/TESTBOX-345phillipsenn
05/11/2023, 5:51 PM<cffile action="Upload" filefield="form.upload_file" destination="#TempUploadPath#" nameconflict="overwrite">
phillipsenn
05/11/2023, 5:52 PMcffileupload(destination=TempUploadPath,nameconflict='overwrite')
phillipsenn
05/11/2023, 5:52 PMJeff
05/11/2023, 6:26 PM<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.dfgrumpy
05/14/2023, 5:09 AMgavinbaumanis
05/15/2023, 7:39 AMfor(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
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!zackster
05/15/2023, 5:48 PMAdam Cameron
mbh
05/17/2023, 5:10 AMfunction 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;
}
zackster
05/17/2023, 10:56 AMgert
05/17/2023, 1:52 PMSimone
05/17/2023, 5:06 PM{"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 hereDean Lawrence
05/18/2023, 2:40 PM<cfset unsubscribeValues = MailingListID & "|" & mailingNum />
<cfset unsubscribeVars = encrypt(unsubscribeValues, encryptKey, "AES/CBC/PKCS5Padding", "HEX") />
And adding as a link in my emails.
<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.
<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.Joshua Rose
05/18/2023, 3:04 PMVimlesh Parihar
05/19/2023, 9:33 AMVimlesh Parihar
05/19/2023, 9:51 AMMark Takata (Adobe)
05/19/2023, 2:53 PMDave Merrill
05/19/2023, 7:18 PMwebsolete
05/22/2023, 3:10 PMBrian
05/22/2023, 8:28 PMzackster
05/23/2023, 10:17 AMMark Berning
05/23/2023, 5:19 PM<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:
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.Vimlesh Parihar
05/24/2023, 10:24 AMDave Merrill
05/24/2023, 9:24 PM<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?