http://coldfusion.com logo
Join Slack
Powered by
# box-products
  • g

    gpickin

    06/09/2022, 3:09 PM
    Join me on the Online CF Meetup today at 11am CDT - "When Should I Use 3rd Party Libraries vs Roll My Own?" https://www.meetup.com/coldfusionmeetup/events/286262739/
    šŸ’Æ 3
  • b

    bhartsfield

    06/09/2022, 4:19 PM
    https://cfml.slack.com/archives/C06TSRXCJ/p1654711078273519?thread_ts=1654677414.626059&cid=C06TSRXCJ Forking this conversation since I believe the original poster is satisfied and I don't want to keep spamming them
    b
    • 2
    • 99
  • a

    aaronstoddard

    06/09/2022, 8:17 PM
    When using the allowedMethods annotation for my Coldbox REST handler, all the values that are normally placed in rc are lost when I use any verb other than GET or POST. If I changed the annotation to GET or POST, all the rc variables are there. Why would this happen?
    b
    • 2
    • 1
  • d

    David Rogers

    06/10/2022, 2:59 PM
    with the coldbox router is there a conditional handler target, something like
    Copy code
    route("/foo")
    .withCondition(() => {...})
    .truecase(() => { return { withAction: "", toHandler: "", ...})
    .falsecase(() => { return { withAction: "maintenanceFallback", toHandler: "" } })
    with the intent like "usually this invokes the
    a:b.c
    handler but on Sunday between 12am-1am this route needs to invoke
    foo:bar.baz
    "
    • 1
    • 1
  • d

    danmurphy

    06/10/2022, 3:33 PM
    Need some help querying a quick entity. I have a
    FoundItem
    which ā€œhasManyā€
    details
    . The memento of the
    FoundItem
    brings back the
    details
    info so this works great…
    var foundItem = getInstance( 'FoundItem' ).findOrFail( rc.id ).getMemento();
    But how do I filter the details when getting a FoundItem? I only want the details with a status of
    P
    (also
    NULL
    , but keeping it simple for now). This still brings back all of the details.
    Copy code
    var foundItem    = getInstance( 'FoundItem' )
    				.findOrFail( rc.id )
    				.whereHas( 'details', function( q ) {
    					q.where( 'status', 'P' );
    				} )
    				.getMemento();
    I’ve also tried changing the line
    findOfFail( rc.id )
    to
    firstWhere( 'id', rc.id)
    with the same results. Thoughts?
    d
    w
    • 3
    • 23
  • b

    bockensm

    06/10/2022, 7:49 PM
    qb question - is it not possible to add a foreign key to a new integer column while altering schema? [SOLVED]
    • 1
    • 4
  • m

    Mason B

    06/10/2022, 7:51 PM
    Hey all, first time messaging, hoping to get some help. I am getting started with unit testing in TestBox using the xUnit syntax. I want to do a simple test on a function that renames a postgres table column. In the test I create a new table with one column and do the testing. However, I get the error
    datasource [name] doesn't exist
    Was trying to look through all the files and .jsons and such, but nothing seemed to do the trick. Did manually set the database in a couple spots(including using data cfconfig save) Any help would be appreciated 😃
    b
    d
    • 3
    • 58
  • d

    davidrschaller

    06/13/2022, 5:02 PM
    Basic question about commandbox server aliases - is the only way to set an alias to a network location is to map a drive letter to that network location?
    s
    b
    • 3
    • 25
  • m

    Mason B

    06/13/2022, 8:03 PM
    I was message over the weekend for a similar question(same problem technically) and was hoping for some more help. I was this time informed of MockBox/mocking in general. I have a function that should rename a column, it seems to be working with the mockbox query sim function but I do not know how to access the specific info from the query. I want to be able to look at the column names and see if it worked. I am looking at these docs, but there is not really as much info as I need, on to do more than just return it: https://testbox.ortusbooks.com/mocking/mockbox/mocking-methods/usdquerysim-method I am testing it with exactly that code:
    Copy code
    mockQuery = mockBox.querySim("id,fname,lname
            1 | luis | majano
            2 | joe | louis
            3 | bob | lainez");
    And using my companies code to change the column "fname" to "firstname", but I am unsure how to check the new column name. I am just an intern so all of this is very new to me so please let me know if there is more/better info I can provide šŸ™‚
    s
    a
    • 3
    • 20
  • m

    mithlond

    06/14/2022, 3:27 PM
    event.renderData - does this have any kind of an intercept point? I'd like to inspect what's going to be rendered and inject some analytics type data into what's going out without having to write a wrapper and do a find/replace over the whole code base
  • m

    mithlond

    06/14/2022, 3:28 PM
    as a side note, the docs here: https://coldbox.ortusbooks.com/digging-deeper/coldbox-proxy/the-event-handlers/renderdata mention that this supports Flex/Air Requests. That part could probably be dropped from the docs now, no?
  • m

    mithlond

    06/14/2022, 3:34 PM
    On this page: https://coldbox.ortusbooks.com/the-basics/interceptors/core-interception-points it mentions there are many intercept points, giving a link to a ColdBox Overview page, but the link has an empty href value, so I'm not sure what page it should be pointing to.
    b
    • 2
    • 1
  • g

    gpickin

    06/14/2022, 5:01 PM
    Going live for the CFML News Podcast

    https://youtu.be/MeHqJm2w3Pkā–¾

  • w

    wil-shiftinsert

    06/14/2022, 8:15 PM
    commandbox question: when executing
    Copy code
    coldbox create model-test testsdirectory=tests/specs/unit/customers/entities/ path=models.customers.entities.qEntry
    I get some placeholder in my test, e.g
    component extends="coldbox.system.testing.BaseModelTest" model="|modelPath|"{
    so is this a bug or am i doing something wrong in the coldbox create call? I would expect the
    |modelPath|
    was replaced by
    models.customers.entities.qEntry
    b
    • 2
    • 6
  • b

    birdy1980

    06/15/2022, 8:59 AM
    Say we want to run our own lucee version... what would be a good approach? Could it be done with bitbucket repo where we publish our own lucee.jar? Or do we need to publish a valid engine packege with a box.json and engine.war ?
    z
    b
    • 3
    • 15
  • r

    richard.herbert

    06/15/2022, 2:33 PM
    I’m struggling to remember or find in the docs the way to list the versions of Java that I can install into the server. Thought?
    r
    w
    b
    • 4
    • 7
  • r

    richard.herbert

    06/15/2022, 2:33 PM
    That’s for CommandBox of course
  • r

    richard.herbert

    06/15/2022, 5:11 PM
    Is there an easy way to convert
    web.config
    into Tuckey rules?
  • r

    richard.herbert

    06/15/2022, 6:02 PM
    Or Undertow predicate and handlers
  • w

    websolete

    06/15/2022, 6:04 PM
    how many rules do you actually have to convert?
  • w

    websolete

    06/15/2022, 6:07 PM
    regardless, shouldn't be that horrible to modify from web.config's xml to tuckey's: https://tuckey.org/urlrewrite/manual/3.0/#configuration
    b
    r
    b
    • 4
    • 16
  • b

    birdy1980

    06/16/2022, 6:59 AM
    I've found a missing image on the ortussolutions.com website: If you the blog search https://www.ortussolutions.com/blog/search and search for something that does not exist (for example: chickens), then you see the text "No Results Found" with a missing image above the text.
    g
    p
    • 3
    • 3
  • r

    richard.herbert

    06/16/2022, 2:08 PM
    I’m trying to convert a
    web.config
    file to use the
    CommandBox
    Undertow Server Rules in my
    server.json
    file. I’ve managed to sort the simple rewrites but I seem to be failing with the regex rules. I have a request to
    /44423ee780249169596c419e18f13e15/stocklist/
    which I think is being caught by this rule in IIS...
    Copy code
    <rule name="stocklist filters" enabled="true" stopProcessing="true">
        <match url="^([0-9a-z]+)/stocklist/([^/]+)/?$" />
        <action type="Rewrite" url="?page=stocklist&aId={R:1}&f={R:2}" />
    </rule>
    My conversion of this IIS rule to Undertow in my
    server.json
    is...
    Copy code
    "rules":[
        "regex( '^([0-9a-z]+)/stocklist/([^/]+)/?$' ) -> rewrite( '?page=stocklist&aId={R:1}&f={R:2}' )"
    ]
    ...but it seems like the request just sails on pass this rewrite. The situation is a little more complicated as it’s part of a SSO request and callback but I’ve worked through the request and I’m sure this is the point where it’s coming apart. Now plugging that regex into my favourite helper, the request
    /44423ee780249169596c419e18f13e15/stocklist/
    isn’t being caught by
    ^([0-9a-z]+)/stocklist/([^/]+)/?$
    and it says that the
    /
    needs to be escaped with
    \/
    but when I do that, the
    \/
    is automatically replaced with
    /
    in the
    server.json
    when I start the server. Also I’m not sure what the
    ([^/]+)/?
    part does at the end? So in my regex helper, if I use
    ^\/([0-9a-z]+)\/stocklist\/([^\/]+)\/?$
    that will match
    /44423ee780249169596c419e18f13e15/stocklist/foo
    and if I use
    ^\/([0-9a-z]+)\/stocklist\/$
    it will find
    /44423ee780249169596c419e18f13e15/stocklist/
    So is IIS more tolerant than Undertow or have I got it all wrong (very possible!)?
    t
    b
    • 3
    • 50
  • b

    bhartsfield

    06/16/2022, 6:12 PM
    I'm not sure if this is a bug or an attempt by ColdBox to show errors one way in dev and another way in prod. Hopefully someone has some insight on how to get around this. In the coldbox rest skeleton, If my "ENVIRONMENT" env var is "production", then my exceptionHandler is not being used. If I change to "development", it works as expected. To reproduce it, •
    coldbox create app name=cbtest --noinit skeleton=rest
    • Coldbox.cfc already has Echo.onError as the exceptionHandler so just add
    onError = () => { dump("I'm the echo.fc onError method"); abort; }
    to Echo.cfc • Then just throw an error somewhere... like echo.cfc index() With ENVIRONMENT=development, you get the onError dump. With ENVIRONMENT=production, you get the core rest response packet (even if you have extended/replaced it with your own) it doesn't make a difference if it is the global exception handler or an onException interceptor, the result is the same.
    w
    • 2
    • 7
  • b

    bockensm

    06/17/2022, 4:32 PM
    Am I correct in observing that body closures in
    describe
    blocks still execute even if I give it
    skip=true
    ?
    b
    • 2
    • 7
  • s

    Slackbot

    06/21/2022, 3:14 PM
    This message was deleted.
  • c

    Carlos Guzman

    06/21/2022, 4:17 PM
    hey I just downloaded commandbox, and I am getting this error, any of you may know what is about? this is Windows JRE-64, and I have Windows 11 on my local machine. The error says it cant install the jsmespath module
    b
    • 2
    • 7
  • t

    thisOldDave

    06/21/2022, 4:19 PM
    is there anyway to mock a cf method such as cfschedule or cfdirectory using querySim() other than wrapping it in a function?
    b
    a
    • 3
    • 10
  • g

    garciadev

    06/21/2022, 5:04 PM
    We are starting soon...

    https://www.youtube.com/watch?v=9D7y9QKUzAgā–¾

    a
    r
    • 3
    • 2
  • r

    Robert Zehnder

    06/21/2022, 6:31 PM
    Is there an easy way to pretty print json from inside commandbox? Sometimes
    print.table
    just won’t cut it. I have tried spelunking through comandbox-* repos, but I thought it may be faster to just ask
    d
    b
    • 3
    • 46
1...789...30Latest