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

    websolete

    03/25/2022, 4:01 AM
    delete lines 55 and 12
    f
    d
    s
    • 4
    • 3
  • m

    mauzer

    03/25/2022, 12:57 PM
    Getting this error when calling a stored proc in a Postgres database. We migrated from MySQL and this was working fine until we switched to Postgres. Any ideas? <td>ERROR: function dbo.spgetaoid(double precision, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying, character varying) does not exist<br> Hint: No function matches the given name and argument types. You might need to add explicit type casts.<br> Position: 15</td> THIS IS THE CALL IN CFCODE: <cfstoredproc procedure="dbo.spGetAOID" datasource="#session.dsn#"> <cfprocparam cfsqltype="cf_sql_numeric" value="#arguments.aostruct.clientID#"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" value="#arguments.aostruct.subjectID#"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" value="#arguments.aostruct.packageID#"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" value="#arguments.aostruct.clientOrderID#"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" value="#arguments.aostruct.resultAddress#"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" value="#arguments.aostruct.customReportName#"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" value="#arguments.aostruct.webBannerGraphic#"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" value="#arguments.aostruct.reportGraphic#"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" value="#arguments.aostruct.postProcessType#"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" value="#arguments.aostruct.postProcessURL#"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" value="#arguments.aostruct.additionalScales#"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" type="out" variable="this.aoid"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" type="out" variable="this.status"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" type="out" variable="this.hashedAOID"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" type="out" variable="this.assessmentURL"> <cfprocparam cfsqltype="cf_sql_numeric" type="out" variable="this.participantID"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" type="out" variable="this.languageUsed"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" type="out" variable="this.resultAddress"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" type="out" variable="this.resultProtocol"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" type="out" variable="this.customReportName"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" type="out" variable="this.reportType"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" type="out" variable="this.jobCategoryTitle"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" type="out" variable="this.webBannerGraphic"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" type="out" variable="this.reportGraphic"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" type="out" variable="this.postProcessType"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" type="out" variable="this.postProcessURL"> <cfprocparam cfsqltype="CF_SQL_VARCHAR" type="out" variable="this.additionalScales"> <cfprocparam cfsqltype="cf_sql_numeric" type="out" variable="this.isAssessment"> </cfstoredproc> THIS IS STORED PROC IN POSTGRES DB -- ============================================= -- Author: Evan Lee -- Create date: 12/11/2008 -- Description: See if AO already exists for the assessments needed in this AOR. If it does, return the existing AOID, if not create new AOR -- ============================================= CREATE OR REPLACE FUNCTION dbo.spGetAOID ( varg_clientID int, varg_subjectID varchar(50), varg_packageID varchar(15), varg_clientOrderID varchar(50), varg_resultAddress varchar(250), varg_customReportName varchar(150), varg_webBannerGraphic varchar(250), varg_reportGraphic varchar(250), varg_redirectURLType varchar(10), varg_redirectURL varchar(500), varg_additionalScales varchar(25), out vaoid int, out vstatus varchar(15), out vhashedAOID varchar(100), out vassessmentURL varchar(250), out vparticipantID int, out vlanguageUsed varchar(10), out vresultAddress varchar(250), out vresultProtocol varchar(10), out vcustomReportName varchar(150), out vreportType varchar(150), out vjobCategoryTitle varchar(150), out vwebBannerGraphic varchar(250), out vreportGraphic varchar(250), out vredirectURLType varchar(10), out vredirectURL varchar(500), out vadditionalScales varchar(25), out visAssessment boolean ) RETURNS VOID AS $$ BEGIN SELECT r.reportType INTO @reportType FROM packageID p INNER JOIN cg.ReportType r ON p.ReportTypeID = r.ReportTypeID WHERE p.packageID = varg_packageID; SELECT jobCategoryTitle, isAssessment INTO vjobCategoryTitle, visAssessment FROM JobCategory WHERE jobCategoryID = LEFT(varg_packageID, POSITION('.' IN varg_packageID) - 1); IF exists (SELECT aoid FROM am.AO WHERE ClientID = varg_clientID AND subjectID = varg_subjectID AND packageID = varg_packageID) THEN /* There is an existing Order for the same packageID for the same person, but we do update the: 1. resultAddress incase they want it to sent in a new address 2. reportGraphic. */ UPDATE am.AO SET clientOrderID = varg_clientOrderID, resultAddress = varg_resultAddress, ReportGraphic = varg_reportGraphic, WebBannerGraphic = varg_webBannerGraphic, LastTimeOrdered = CURRENT_TIMESTAMP WHERE ClientID = varg_clientID AND subjectID = varg_subjectID AND packageID = varg_packageID; -- we then get the existing AOID, and etc for the existing order, and use it. Hence we don't have to create a new order each time. SELECT aoid, status, hashedAOID, assessmentURL, participantID, languageUsed, resultAddress, resultProtocol, customReportName, WebBannerGraphic, ReportGraphic, RedirectURLType, RedirectURL, AdditionalAttitudeScales INTO vaoid, vstatus, vhashedAOID, vassessmentURL, vparticipantID, vlanguageUsed, vresultAddress, vresultProtocol, vcustomReportName, vwebBannerGraphic, vreportGraphic, vredirectURLType, vredirectURL, vadditionalScales FROM am.AO WHERE ClientID = varg_clientID AND subjectID = varg_subjectID AND packageID = varg_packageID; ELSE DECLARE v_arg_resultProtocol varchar(10); SELECT resultProtocol INTO v_arg_resultProtocol FROM clientDetail WHERE ClientID = varg_clientID; INSERT INTO am.AO (clientID,subjectID,packageID,resultAddress,customReportName,resultProtocol, status, OrderCreationDate) VALUES (varg_clientID,varg_subjectID,varg_packageID, varg_resultAddress, varg_customReportName, v_arg_resultProtocol, 'Acknowledged', CURRENT_TIMESTAMP); IF exists (SELECT TOP 1 participantID, languageUsed FROM am.AO WHERE ClientID = varg_clientID AND subjectID = varg_subjectID ORDER BY aoid DESC) THEN SELECT TOP 1 participantID, languageUsed INTO vparticipantID, vlanguageUsed FROM am.AO WHERE ClientID = varg_clientID AND subjectID = varg_subjectID ORDER BY aoid; END IF; vaoid := @@IDENTITY; vhashedAOID := NULL; vassessmentURL := NULL; vstatus := 'Acknowledged'; vresultAddress := varg_resultAddress; vresultProtocol := v_arg_resultProtocol; vcustomReportName := varg_customReportName; vwebBannerGraphic := varg_webBannerGraphic; vreportGraphic := varg_reportGraphic; vredirectURLType := varg_redirectURLType; vredirectURL := varg_redirectURL; vadditionalScales := varg_additionalScales; END IF; END; $$ LANGUAGE plpgsql;
    b
    s
    • 3
    • 9
  • g

    gus_dancy

    03/25/2022, 4:14 PM
    I have a puzzler. I have a piece of code that generates a pdf using cfdocument. I have a footer saying <cfdocumentitem type="footer"> Function Sheet for #getItem.Agenda_Name# Page #cfdocument.currentpagenumber# of #cfdocument.totalpagecount# </cfdocumentitem> Which works great. But I also have a report that returns multiple of these pdfs and merges them into one document. It errors saying "Element PDF is undefined in a Java object of type class coldfusion.thread.ThreadScope. The error occurred in C/.../inc report databeo.cfm line 79" https://pastebin.com/fwdKjf7G
    • 1
    • 7
  • d

    Dave Merrill

    03/25/2022, 7:33 PM
    Javascript question. I want to trigger the onclick handler of an element, without the normal effects of that click, for instance toggling a checkbox. I want its onclick to run, while the checkbox stays in the state it was in. I tried this:
    document.getElementById('incidentsourceid_12').dispatchEvent(new Event('click'));
    But that doesn't run the handler (or toggle the checkbox, which is fine). This does work, but eval is more or less against my religion:
    eval(document.getElementById('incidentsourceid_12').getAttribute('onclick'));
    Related, is there a general js Slack channel?
    p
    d
    +2
    • 5
    • 13
  • p

    PK

    03/26/2022, 12:51 AM
    I get these errors in my CF logs. I can't find the source. Any ideas? How do I track this down? I don't know which site it's coming from and I can't find any reference in code.
    s
    • 2
    • 4
  • j

    johnbarrett

    03/26/2022, 4:38 AM
    I had a job interview this morning, I passed the technology review, and I think that I got the job. They told me to learn about unit tests. What is unit testing in ColdFusion? How do I get started with it?
    ⭐ 1
    c
    d
    +3
    • 6
    • 11
  • j

    johnbarrett

    03/28/2022, 7:59 AM
    The Hawaii ColdFusion User Group is looking for a speaker to talk on ColdFusion ORM. Please contact me if you can give this talk in April.
    ❤️ 1
    s
    m
    • 3
    • 2
  • w

    websolete

    03/28/2022, 1:23 PM
    trying to debug and replicate a specific sql error being thrown from a query. anyone know if you can explicitly throw an error of type Database and specify a particular sql error code? i need to be able to force the same type of error getting thrown in order to come up with some handling for it
    t
    c
    a
    • 4
    • 17
  • n

    nickg

    03/28/2022, 3:50 PM
    Hi All, I also have a CMS related question. We have a CF based CMS which is pretty good, but lacks page builder functionality (drag and drop templating, etc.) that you would get in Wordpress plugins like Divi, Duda, etc. Has anyone found / built similar theming / page building plugins to work in the context of a CF CMS?
    j
    p
    m
    • 4
    • 5
  • g

    Graham

    03/29/2022, 12:20 AM
    My client is running CF 2021 and as part of the install an older version of log4j is installed at: C:\ColdFusion2021\cfusion\jetty\lib\ext\log4j-1.2.17.jar Their IT dept. is kicking up since it is an obsolete version. Can it be upgraded?
    b
    m
    +2
    • 5
    • 22
  • d

    Dave Merrill

    03/29/2022, 1:16 PM
    A while back our CF2018 production site started throwing a ton of errors that a specific cfm file many pages cfmodule to suddenly couldn't be found. No changes had been made to the server for a day and a half. I fixed it by restarting the CF service. I posted here about it at the time. Yesterday one specific page started throwing that same error, about the same cfmoduled-to file. A coworker reproduced it multiple times, while most of the site continued to run normally. The error didn't hit our normal CF error handling, and the page shown was a system/IIS 500 error page. He fixed it by clicking Reset Template Cache. Again nothing had changed on that server for days, not since 3/24. Has anyone seen anything similar? Any ideas of a cause, or a prevention strategy?
    t
    d
    • 3
    • 3
  • s

    simiane

    03/29/2022, 3:33 PM
    I feel like this may be a silly question, but I struggle to use dynamic values in closure functions. It seems like such an obvious use-case, but every bit of documentation or example I can find uses static values in the inner function. I know that I can let the inner function just search through the outer scopes until it finds a variable, but that just doesn't feel right to me. I feel like I should be able to explicitly provide a value to the function, like an argument default. Anyone know if this, or something similar, is possible? e.g. I feel like this should work, but doesn't...
    Copy code
    <cfscript>
        myArray = ['foo','foo','foo','bar'];
        myCriteria = 'bar';
        filteredArray = myArray.filter(function(myArrayVal, criteria = myCriteria){
        	return Arguments.myArrayVal == Arguments.criteria;
        });
        writeDump(filteredArray);
    </cfscript>
    m
    w
    +2
    • 5
    • 33
  • d

    dick

    03/30/2022, 11:13 AM
    Has anyone here had experience of authenticating against Azure Active Directory? Tricks, tips, pitfalls?
    s
    t
    • 3
    • 3
  • s

    Simone

    03/30/2022, 7:48 PM
    how can i add 0 in cfqueryparam if no value is defined using a NULL attribute
    Copy code
    <cfqueryparam cfsqltype="cf_sql_integer" value="#form.id#" null="#NOT len(trim(form.id))#">
    m
    m
    c
    • 4
    • 9
  • m

    Michael Gillespie

    03/30/2022, 7:50 PM
    After decades of using cfmail and the SMTP service on the webserver to send transactional email ("Your order has shipped", "Your report is ready", "Here is your password reset link", etc) , I am wanting to change to an off site, API solution. I would like to send email and occasionally texts, for multiple addresses in multiple domains and am looking for an API that is relatively easy to implement, works with and without templates but has some depth that can be explored as I become more familiar with it. Something that hopefully costs less that $50/mo. for sending less that 10k email a month (probably half that actually) Any suggestions from folks who are actually using an API that meets these criteria?
    d
    r
    +5
    • 8
    • 37
  • s

    sthornton1978

    03/30/2022, 11:27 PM
    I'm debugging a Scheduler Issue. A page is scheduled to run each day, and only continues when certain criteria is met ( dates checked against the database). It runs at 4:15AM each day, however I am getting a 2nd execution of the task at 5:01AM at least once per month ( no dates in common though ) I've checked the neo-cron.xml file for a 2nd instance of the page, I have checked the scheduler.log in CF 2016 Admin ( its only in there once per day), I have checked the page itself to see if it refers to itself, I have checked the code base to see if the page is referenced elsewhere I'm out of troubleshooting ideas. Does anyone have advice?
    t
    • 2
    • 5
  • s

    Sebastiaan Naafs - van Dijk

    03/31/2022, 1:39 PM
    Does anyone know who hosts learncfinaweek? It seems to be down or gone or whatever, and I'd like to get some stuff off of it 😉
    m
    m
    +3
    • 6
    • 5
  • m

    Manta

    03/31/2022, 2:19 PM
    Hi 🙂 Short question. I know cfgrid should not be used, but i have an application which i have to transfer from CF2016 to CF2021. Now i found an issue, that the bind of a grid brings me to an "element not found" error. Do you have an idea what changed?
    • 1
    • 2
  • m

    Mark S.

    04/01/2022, 2:35 PM
    where I can find FuseBox 3 & 4 documentation? that are a little out of date. Thanks.
    d
    g
    • 3
    • 3
  • b

    bdw429s

    04/01/2022, 2:53 PM
    Any good tech-related April Fools jokes today? Post them in the thread.
    m
    j
    +2
    • 5
    • 7
  • s

    satauros

    04/01/2022, 6:02 PM
    Just throwing an architectural question in the group here. Let's say I have a folder which contains multiple files which need to be processed (this processing can be anything). How would one set this up, taking the following in account: in a multithreaded setup, only one thread may access the file at any given time, processed files should be marked as processed - any means possible, failed files should be marked and possibly queued for future processing, failures should be logged, etc. This is just a glimpse of what would be needed. I already have some thoughts, but I have had some good experiences with asking opinions here. On a side note, no this is not an april fools thing :p.
    s
    • 2
    • 2
  • f

    fmdano

    04/01/2022, 7:21 PM
    This might be a dumb question, but we are using Session variables to log in the users on this old site (cfid, cftoken)....when the user hits the logout button, the session is cleared out and rotated....However, the users might just close the browser with the X....how can I or can I kill the session variables OR is it still the way it has always been....session just stays in memory for the 1 before expire? OnBeforeUnload or something else via JS? If not that is ok, just need to explain it to the Client.
    b
    l
    m
    • 4
    • 11
  • l

    larryclyons

    04/01/2022, 7:25 PM
    Ben Nadel has a pretty good discussion of it. I think you'll have to do a structclear and delete the relevant cookies. https://www.bennadel.com/blog/1846-clearing-the-session-scope-does-not-end-your-coldfusion-session.htm
    m
    f
    b
    • 4
    • 6
  • s

    Simone

    04/03/2022, 1:00 AM
    anyone have CF_ThreeSelectsRelated custom tag
    b
    l
    s
    • 4
    • 3
  • a

    Adam Cameron

    04/03/2022, 12:48 PM
    @abram hey mate are the Lucee and CF servers running on trycf similar specifications and tunings? Why I ask is if I see dog-slowness on one platform vs the other, is that gonna be down to the platform innately slower than the other, or could it be the server spec unfairly comparing them?
    a
    • 2
    • 6
  • m

    Mark S.

    04/03/2022, 3:27 PM
    How to do setup for IIS with Coldfusion 2021? Please help me to do the configuration. Thanks.
    b
    • 2
    • 1
  • d

    David Price

    04/03/2022, 10:20 PM
    I have stood up a CF2021 in command box and am trying to test cfdocument PDF creation and it will not show any images or background. I assume this is because it is a developer version of CF. Is there a way to test this without a licensed version?
    b
    c
    +2
    • 5
    • 44
  • m

    Mark S.

    04/04/2022, 2:17 PM
    What is the best coldfusion MVC framework that have good documentation? I found some one that doesn't have good documentation.
    🎉 1
    t
    p
    +5
    • 8
    • 7
  • p

    PK

    04/04/2022, 5:02 PM
    Anyone have a better solution to looking through CF logs? The CF admin log filter is frustrating.
    ☝🏻 1
    t
    s
    +3
    • 6
    • 10
  • t

    TEMann

    04/05/2022, 6:01 PM
    Question: can the attempt to dump or output a complex var to a simple var, which causes and error, also cause memory leak? (not even sure I understand entirely what I am asking)
    w
    a
    d
    • 4
    • 7
1...456...38Latest