http://coldfusion.com logo
Join Slack
Powered by
# cfml-beginners
  • s

    Simone

    02/21/2023, 3:20 PM
    does anyone already worked upon https://learn.microsoft.com/en-us/graph/outlook-calendar-concept-overview
    m
    e
    w
    • 4
    • 6
  • g

    Gabriel Rodrigues

    02/23/2023, 8:13 PM
    Hello guys, I'm trying to run TestBox on my .gitlab-ci.yaml, there are any tips/tutorials that I can follow? Do I have to build the application first before running the tests?
    p
    j
    • 3
    • 15
  • g

    gsr

    02/26/2023, 1:20 AM
    i am trying to call the component
    Copy code
    component implements="IStringsFactory" {
    the implements is in the same folder as component
    Copy code
    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.
    a
    • 2
    • 10
  • g

    gsr

    02/26/2023, 1:20 AM
    Copy code
    <cfset Application.factory = new appcfc.com.StringsFactory()>
  • n

    Nick

    03/01/2023, 8:46 PM
    We have a legacy page (in CF2018) that calls another to do some processing through a cfhttp and then logs that it's complete:
    Copy code
    <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.)
    r
    e
    • 3
    • 5
  • p

    Prashant S

    03/03/2023, 11:11 AM
    @Prashant S has left the channel
  • s

    Sean Callahan

    03/07/2023, 10:08 PM
    Just setup a dedicated VM running Windows Server 2012 with CF11 (up-to-date with hf19) to run a few legacy scripts that are not able to be refactored due to a need for a 32-bit ODBC connection. All of the scripts pull the data from a local ODBC and then push the data to our production server via
    cfhttp
    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:
    Copy code
    "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
    b
    • 2
    • 17
  • g

    gsr

    03/11/2023, 5:57 PM
    bit of a strange error i am using forms on my page, and one of forms have enctype defined as multipart/form-data and whenever i am uploading i am getting an error which says
    Copy code
    DetailThe files upload action requires forms to use enctype="multipart/form-data".
    MessageInvalid content type: ''.
    it seems its not picking up the file or something
    Copy code
    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
    a
    r
    • 3
    • 4
  • e

    epipko

    03/11/2023, 7:48 PM
    Wonder if someone can help me understand and fix this: I am trying to create .json file. When I dump variable - all looks good, but once I serialize it, for some reasons, "\" are added.
    b
    • 2
    • 12
  • e

    epipko

    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}"]}]}}
    r
    • 2
    • 1
  • e

    epipko

    03/11/2023, 7:51 PM
    j.jpg
  • s

    Simone

    03/28/2023, 4:50 PM
    i am trying to build an oracle hcm api tol, should i use taffy or coldbox? suggestions
    a
    i
    +7
    • 10
    • 22
  • j

    jesson diazz

    04/14/2023, 3:36 PM
    sometimes changes to failed so wondering if there is something to monitor that service when it fails, any recomendation?
    a
    • 2
    • 1
  • g

    gsr

    04/14/2023, 9:51 PM
    i never worked with ubuntu before so i am trying to create a function which writes pdf files to the folder, i am getting permissions error but i am not sure if it is the right way of doing it here is my code application.imagesPath = "/projects/files/images/openimages/";
    Copy code
    public 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
    a
    j
    • 3
    • 8
  • p

    Priyanka

    04/19/2023, 9:04 PM
    what are the best VScode extentions that could be useful for coldfusion development?
    šŸ‘ 1
    s
    j
    +5
    • 8
    • 31
  • d

    David S

    04/21/2023, 9:25 AM
    Hey everyone, I am so relieved there is a place where coldfusion devs hang out. Nice to meet you guys!
    šŸ‘‹šŸ» 1
    šŸ‘‹ 7
    šŸ‘‹šŸ¼ 1
    šŸ‘‹šŸ¾ 1
  • d

    David S

    04/21/2023, 9:33 AM
    I just have a quick question, I am trying to verify the source of a variable from a template. the variable jumps through several templates and transformations before being output on the final template. How can I use CFtrace to trace the variable to its origin? the follow attribute seems to just dump the location where the trace tag is in. ideally I would like the log to show me the templates it jumps through as well as its origin. I also appreciate any other debugging tips! Much thanks! I am running my templates on a lucee server
    a
    • 2
    • 2
  • p

    Peter Hoopes

    04/23/2023, 3:53 PM
    Might be a silly question: is it considered bad practice to put custom private functions in the Application CFC? Perhaps in order to consolidate code that ends up in the lifecycle methods?
    a
    g
    • 3
    • 5
  • g

    gsr

    04/24/2023, 1:56 PM
    using oAuth for microsoft api, but i am getting an issue when a token request is made.
    s
    • 2
    • 26
  • s

    Simone

    04/26/2023, 1:00 AM
    So back to Oracle HCM, has anyone used it, i wrote the api call and i see it returns me results and using its pagination, i fetch results and insert into database, the problem now is, it returns only 7000 records while i see in my dev environment it has 20000 records does anyone faced this issue before, i am using the default count of 25 what it refers and gives me the data back, i can share the oracle doc which i am planning to implement
  • r

    Ryan Albrecht

    04/27/2023, 1:56 PM
    The other day I made some changes to our production servers to change the user that coldfusions run as in a Windows environment. Does any one have a link that shows which directories/registry keys/services need their ACLs changed? Since the change I have been having some issue and im trying to track them down.
    e
    a
    +2
    • 5
    • 25
  • s

    Simone

    04/27/2023, 9:30 PM
    my data is coming as:
    Copy code
    <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 here
    t
    • 2
    • 1
  • a

    Adam Cameron

    04/29/2023, 11:27 AM
    I have this code:
    Copy code
    // 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!
    t
    • 2
    • 1
  • e

    epipko

    05/01/2023, 3:32 AM
    I have the following constract when parsing .json file:
    <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">)
    t
    m
    d
    • 4
    • 8
  • e

    epipko

    05/05/2023, 4:41 PM
    I have a few apps developed over a period of time and suspect that some of them are not being used. Question: is possible to log (database?) every time a page is running and by whom?
    m
    r
    c
    • 4
    • 6
  • g

    gsr

    05/05/2023, 11:59 PM
    anyone knows how to do a pagination in stored procedure, i am working on datatables and had to use stored proc but never used pagination there
    m
    • 2
    • 4
  • g

    gsr

    05/08/2023, 1:56 AM
    trying to get the datatables to use sql pagination here is what i am getting from DB i was reading some blogs and the datatables using this technique is done somewhere, i am just in rush so great if helpful if someone can point to a tutorial
    p
    m
    • 3
    • 14
  • e

    epipko

    05/08/2023, 7:04 PM
    Silly question here. I am building dynamic values in json file Based on value of complete_refund, I need to make value of shipping_refund as
    "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?
    a
    m
    +2
    • 5
    • 61
  • s

    Slackbot

    05/08/2023, 7:11 PM
    This message was deleted.
    b
    i
    +2
    • 5
    • 5
  • a

    Adam Cameron

    05/08/2023, 9:40 PM
    @epipko some reading for you, based on that other thread: • https://blog.adamcameron.me/2013/09/when-to-use-pound-signs.html • https://blog.adamcameron.me/2012/07/what-one-can-and-cannot-do-with.html#getToThePointCameron
1...45678Latest