Hey Guys, Relatively new to using box. I'm runnin...
# box-products
b
Hey Guys, Relatively new to using box. I'm running a rather old CF11 app, not using box. But, I want to run docbox against it. I've managed to do this, but, of course, it's not working 100% because it looks like it's running the Lucee engine and not a CF11 one. Can anyone point me in the right direction to get this to work? Maybe an older version of box running under a container.. or something?
b
Hi Billy, we have roughly 38,000 products with the word "box" in the name. Could be let us know which one you're using 🙂
@billy
Are you by chance trying to generate DocBox API docs for the CFCs in a CF11 code base using the
commandbox-docbox
module installed into CommandBox?
b
Yes.
I thought I had said docbox in my question.. 😕
b
You did, but docbox can be used in several different ways
Some with coldbox. Some with commandbox. Or some with coldbox and commandbox!
It can be run as a web app or a cli tool
b
I was running it as a cli tool
b
Can you share your setup, the command you've run and the errors you encountered?
b
box docbox generate source
Warning! The following script has errors: app.common.modelbaseservice key [SYSTEM_APPLICATION_NAME] doesn't exist lucee.runtime.exp.ExpressionException: key [SYSTEM_APPLICATION_NAME] doesn't exist at lucee.runtime.type.util.StructSupport.invalidKey(StructSupport.java:67)
My app isn't Lucee compatible..
b
They error really has nothing to do with lucee compat. It's likely just pseudo constructor code which makes assumptions about what variables will exist.
b
okay. Hmm.. I had some errors about it complaining about functions that I wrote that didn't exist in CF11, but do in later versions. Like CreateGUID
b
Did you put these functions in the application scope?
b
That was a different error.. let me grab that..
Warning! The following script has errors: app.common.modelbaseservice The name [CreateGUID] is already used by a built in Function lucee.runtime.exp.TemplateException: The name [CreateGUID] is already used by a built in Function
b
Ahh, yes. Lucee does have that. You can work around it, but obviously there's little reason for you to do so.
b
That was just one example. Another was something about serialize not taking more than one argument, which is okay for CF11
That's why I was trying to figure out if there was a switch or something to make it use CF11 vs Lucee
b
I'm on my phone ATM, but the short answer is prolly for you to use the app version of docbox which you can run inside your cf11 server.
b
ok.
b
Ok, I can't find a repo with just the to docbox generator app, but here's an example https://github.com/Ortus-Solutions/commandbox/tree/development/apidocs
As part of the commandbox build, I start a server in that folder and hit the index file
Now, that said, I don't know if docbox's code will run on CF 11 as old as that is.
But it's worth trying
That would also give you the chance to run your code in the context of your app.
b
okay. I'll give that a try
OKay, so, I tried that, and it didn't work.. died on the cfdirectory function because CF11 can't use it like it's implemented.
b
Unfortunatley, I think you may be unable to use CF11 with Docbox
Honestly, it's really old at this point and not supported by anyone
You may be able to spin up a CommandBox server on ACF 2023 to run it, but that assumes your codebase will work on it 🙂
We use docbox a lot, but for all our internal libraries which are compatible with both Adobe and Lucee, we have no issues just using Lucee inside of CommandBox to generate the metadata for the CFCs
b
One function I found that is fine in CF11-2023 is serialize with additional arguments, but Lucee doesn't want more than 1 argument. I'll keep playing with it.
b
Yep, Lucee has a ticket for that in the backlog https://luceeserver.atlassian.net/browse/LDEV-2251