Simone
02/21/2023, 3:20 PMGabriel Rodrigues
02/23/2023, 8:13 PMgsr
02/26/2023, 1:20 AMcomponent implements="IStringsFactory" {
the implements is in the same folder as component
interface {
public ILocalizedStrings function getStrings(required string directory, required string defaultLocale);
}
i am getting an error Could not find the ColdFusion component or interface com.IStringsFactory.
gsr
02/26/2023, 1:20 AM<cfset Application.factory = new appcfc.com.StringsFactory()>
Nick
03/01/2023, 8:46 PM<cfhttp url="#myURL#/processAction.cfm" timeout="10800" method="get" />
<cfquery name="insertLog" datasource="#myDSN#">
INSERT INTO ActionLog
(ActionName,
Complete)
VALUES
('Process Action',
1)
</cfquery>
In processAction.cfm
there's whole mess of logic ending with it's own INSERT into a DB log as the very last thing in the file.
The issue is that processAction.cfm
logs its final query around 30 minutes after being called, but the query above (right after the cfhttp
) is timestamped 3 hours after being called, which corresponds to the timeout="10800"
. What could cause processAction.cfm
to reach its last line and finish its work in 30 minutes but not return a response to the cfhttp
, causing the cfhttp
to wait and wait till its timeout? (Again, this is legacy and I could rewrite it, but just trying to understand this behavior.)Prashant S
03/03/2023, 11:11 AMSean Callahan
03/07/2023, 10:08 PMcfhttp
over an https protocol.
What I can't seem to wrap my head around is that when I run these scripts in the browser using the resolved URL (not localhost
, but that also works fine), all is right in the world. But when the scheduler runs them:
"Error","DefaultQuartzScheduler_Worker-1","03/07/23","13:55:27",,"Connection Failure: Status code unavailable "
coldfusion.tagext.net.HttpTag$HttpConnectionFailureException: Connection Failure: Status code unavailable
at coldfusion.tagext.net.HttpTag.connHelper(HttpTag.java:1311)
at coldfusion.tagext.net.HttpTag.runCall(HttpTag.java:1413)
at coldfusion.scheduling.CronTask.execute(CronTask.java:121)
at org.quartz.core.JobRunShell.run(JobRunShell.java:207)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:560)
I already imported the production server's cert into the castore
. Also the Root CA has been added to the castore
gsr
03/11/2023, 5:57 PMDetailThe files upload action requires forms to use enctype="multipart/form-data".
MessageInvalid content type: ''.
it seems its not picking up the file or something
coldfusion.tagext.io.FileUtils$CFFileNonMultipartException: Invalid content type: ''. at coldfusion.tagext.io.FileTag.uploadAll(FileTag.java:689) at coldfusion.tagext.io.FileTag.doStartTag(FileTag.java:411) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:3851) at
epipko
03/11/2023, 7:48 PMepipko
03/11/2023, 7:49 PM<cfset _PAYLOAD = serializeJSON(fulfillment_json)>
<cfoutput>#_PAYLOAD</cfoutput>
Payload: {"fulfillment":{"message":"Your package was shipped.","location_id":"30406673","tracking_info":{"number":"9405511206207180455478","url":"www.usps.com"},"notify_customer":false,"line_items_by_fulfillment_order":[{"fulfillment_order_id":5784060395699,"fulfillment_order_line_items":["{\"id\":12254030430387,\"quantity\":1},{\"id\":12254030463155,\"quantity\":1}"]}]}}epipko
03/11/2023, 7:51 PMSimone
03/28/2023, 4:50 PMjesson diazz
04/14/2023, 3:36 PMgsr
04/14/2023, 9:51 PMpublic any function writepdf(required pdfFile="") {
var sourcefile="#arguments.pdffile#";
var n = 'a.pdf';
var dir = application.imagesPath & n;
cfpdf(action="write",source="#sourcefile#",destination="#dir#",overwrite="yes");
return n;
}
i am getting Permission denied error
Priyanka
04/19/2023, 9:04 PMDavid S
04/21/2023, 9:25 AMDavid S
04/21/2023, 9:33 AMPeter Hoopes
04/23/2023, 3:53 PMgsr
04/24/2023, 1:56 PMSimone
04/26/2023, 1:00 AMRyan Albrecht
04/27/2023, 1:56 PMSimone
04/27/2023, 9:30 PM<cfset session.data.id = '212|a,b|people,looking'>
<cfloop collection="#session.data#" item="i">
<span>#getToken(session.data[i],2,'|')#</span>
<span> #getToken(session.data[i],3,'|')#</span></div>
</cfloop>
i want to display a = people
b= looking,
i am missing something hereAdam Cameron
// Person.cfc
component {
function init(firstName, lastName) {
variables.firstName = arguments.firstName
variables.lastName = arguments.lastName
}
static function createFromArray(nameParts) {
return new Person(nameParts[1], nameParts[2])
}
}
Note the explicit reference to Person
in createFromArray
.
I was rather expecting to be able to go new this
or new self
or something there. Neither worked... what - if anything - is the CFML equiv of that?
Full disclosure: I have not googled much, and don't want ppl to do my googling for me... it's pretty much a throw-away question. So if someone knows... I'd appreciate the knowledge share. I don't expect anyone to do any of their own research to work it out though.
Thanks!epipko
05/01/2023, 3:32 AM<cfset line_items = jsonData.order.line_items>
<cfloop array="#line_items#" index="line_item">
<cfset line_item_sku = #line_item.sku#>
</cfloop>
This time, for some reason "sku" is not defined (Element SKU is undefined in LINE_ITEM.).
Question: how do I make sku = 'XX' if it's not defined.
I've tried Elvis notation, but without success (<cfset line_item_sku = #line_item.sku#?:"XX">)epipko
05/05/2023, 4:41 PMgsr
05/05/2023, 11:59 PMgsr
05/08/2023, 1:56 AMepipko
05/08/2023, 7:04 PM"amount": 0
OR "full_refund": true
I can't seem to make it work.
<cfif complete_refund is "TRUE">
<cfset shipping_refund = "full_refund": &true>
<cfelse>
<cfset shipping_refund = "amount": &0>
</cfif>
What am I doing wrong?Slackbot
05/08/2023, 7:11 PMAdam Cameron