gpickin
06/09/2022, 3:09 PMbhartsfield
06/09/2022, 4:19 PMaaronstoddard
06/09/2022, 8:17 PMDavid Rogers
06/10/2022, 2:59 PMroute("/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
"danmurphy
06/10/2022, 3:33 PMFoundItem
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.
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?bockensm
06/10/2022, 7:49 PMMason B
06/10/2022, 7:51 PMdatasource [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 šdavidrschaller
06/13/2022, 5:02 PMMason B
06/13/2022, 8:03 PMmockQuery = 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 šmithlond
06/14/2022, 3:27 PMmithlond
06/14/2022, 3:28 PMmithlond
06/14/2022, 3:34 PMwil-shiftinsert
06/14/2022, 8:15 PMcoldbox 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
birdy1980
06/15/2022, 8:59 AMrichard.herbert
06/15/2022, 2:33 PMrichard.herbert
06/15/2022, 2:33 PMrichard.herbert
06/15/2022, 5:11 PMweb.config
into Tuckey rules?richard.herbert
06/15/2022, 6:02 PMwebsolete
06/15/2022, 6:04 PMwebsolete
06/15/2022, 6:07 PMbirdy1980
06/16/2022, 6:59 AMrichard.herbert
06/16/2022, 2:08 PMweb.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...
<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...
"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!)?bhartsfield
06/16/2022, 6:12 PMcoldbox 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.bockensm
06/17/2022, 4:32 PMdescribe
blocks still execute even if I give it skip=true
?Slackbot
06/21/2022, 3:14 PMCarlos Guzman
06/21/2022, 4:17 PMthisOldDave
06/21/2022, 4:19 PMRobert Zehnder
06/21/2022, 6:31 PMprint.table
just wonāt cut it. I have tried spelunking through comandbox-* repos, but I thought it may be faster to just ask