[Coldbox 4.3.0][Coldfusion 2016] - Installing to existing Non-Coldbox website

I have some experience in programming in Coldbox but no experience in downloading and installing it on an existing site. The Coldbox examples spin up a Lucee server which I do not want.

I already have a fully functioning non-Coldbox site. I thought I could simply install Coldbox ( via CommandBox ), create a default layout and all would be fine. However, I only get errors like “Error building: interceptor-SES…” or “this or that coldbox component can’t be found”.

Is it really that difficult to use coldbox on an existing non-coldbox site? I’ve searched the net extensively but cannot find information on how to do this. Is there a mapping somewhere that I need to set?

My development web root is c:\inetpub\wwwroot\siteName.

Thanks

I’m a little unclear on exactly what you’re trying to do. There are two things you need installed:

  1. The ColdBox framework itself (usually just placed in the web root in a folder called “coldbox” or somewhere where you can create a /coldbox mapping that points to it
  2. The application itself, or app skeleton. i.e., your Application.cfc boillerplate, config files, starting handler, views, etc.
    You can create both of those in a single step with CommandBox:

CommandBox> coldbox create app

If you’re doing this in a folder of code that already exists, then you might want to be careful so you don’t overwrite any existing files in your legacy app, like the Application.cfc.
Can you explain exactly how you are wanting to integrate Coldbox with your existing application. You can just dump in the file, but it might make sense to keep them a bit more separated. There’s no automated version of a custom installation like that though once you get off into the weeds of a custom setup.

And regarding the Lucee servers, you can still use all the getting started guides, just ignore the part where we have you start a server. Actually, you may WANT to just follow the full guides as written in a new, empty folder just to familiarize yourself with the framework. CommandBox can also start up any version of Adobe ColdFusion and it won’t interfere with your existing installations either. When you’re done testing, you can just stop the server and delete the files and no harm is done.

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Mike,

At the very minimum, you’re going to need a coldbox mapping, if it doesn’t exist in the root of your site. You’ll also make sure that your application start calls the Bootstrap and that you have a config in the conventions directory, or map it using the variables in this Application.cfc:

https://github.com/coldbox-templates/advanced-script/blob/master/Application.cfc

My suggestion would be to take the Application.cfc above and customize it with the items which are in your existing app. You’ll need to do that with the onRequestStart method anyway to be able serve coldbox handlers from your application.

Jon

Brad,

I already have CF 2016 running on my laptop. This is the server that I wish to continue using. Actually, I guess it IS being used since I’m getting all these mapping errors.

The ‘Coldbox’ folder is placed right into my site, along with all the other folders (handler,model, view, layout etc).

I just want to know why I’m getting all these “can’t find this and can’t find that” type of errors that Coldbox is throwing.

> I already have CF 2016 running on my laptop. This is the server that I wish to continue using.

I understand and appreciate that. What I was suggesting was that if you’re having issues getting ColdBox running inside your existing server, playing around in a temporary sandbox to get a better understanding of how it works might be beneficial. You’ll also likely find that using CommandBox is way easier than messing with installers. I haven’t “installed” CF or Lucee in years but I use them every day :slight_smile:

> The ‘Coldbox’ folder is placed right into my site, along with all the other folders (handler,model, view, layout etc).

It’s not a requirement that ColdBox be in the same folder as your site. It’s a requirement that /coldbox maps to the coldbox folder. That means, it either needs to be in the webroot, or you need a mapping. This isn’t a ColdBox thing per se, just the basic way that ColdFusion looks up CFCs. Since I’m unclear on whether your ColdBox app (handlers, models, etc) are in the web root or in a subfolder off the web root, I can’t comment on if you’re existing setup should work or not.

> I just want to know why I’m getting all these “can’t find this and can’t find that” type of errors that Coldbox is throwing.

I’d love to know that too but right now you really haven’t provided enough information :slight_smile: Start by confirming /coldbox resolves to the framework folder. It’s usually just that simple. So long as the framework can be found, the app should work. Without knowing your entire directory structure, the exact URLs you’re hitting, and the exact errors you’re getting, I can only guess as to what’s happening.

What I do often times see, is people will try and put their ColdBox app in a subfolder off the web root and they’ll stick the ColdBox framework in that subfolder, but neglect to create any sort of mapping. What will happen is the bootstrap in Application.cfc will “find” the “coldbox.system.Bootstrap” class because it’s in the same relative folder which will cause the framework to start to load, but as soon as another file not in the root of the app tries to create a CFC like “coldbox.system.foo” then it errors out because there’s still no mapping and the 'same folder" rule doesn’t apply. ColdBox can’t control any of that, though. That’s just the rules that ColdFusion uses when trying to resolve CFC paths.

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Hi Mike

Just guessing that cache setting causing the issue, make sure all these below setting are unchecked at your server.

When I say that all of the Coldbox folders are in my site, what I mean is that they are in c:\inetpub\wwwroot\TopLevelFolder. The CB folders are in ‘TopLevelFolder’, which is the highest level folder in my website.

Does that help?

I appreciate your patience.

When I say that all of the Coldbox folders are in my site, what I mean is that they are in c:\inetpub\wwwroot\TopLevelFolder. The CB folders are in ‘TopLevelFolder’, which is the highest level folder in my website.

Does that help?

I appreciate your patience.

That’s how I have it.

I started over by deleting my entire web site so I can start with nothing. I created my site folder at c:\inetpub\wwwroot\mySite. I then opened CommandBox and did “coldbox create app name=mySite”.

I created the mapping “/coldbox” in the Coldfusion Administrator that points to c:\inetpub\wwwroot\mySite\coldbox.

Still no joy. Nothing resolves. Just a plethora of “can’t find this or that” errors.

If I spin up a Lucee server, no problem. I don’t understand why it would work on Lucee and not on my already installed CF 16 server.

Finally got it running. Had to append ‘mySite’ to applicationHelper in Coldbox.cfc like so:

applicationHelper = “/mySite/includes/helpers/ApplicationHelper.cfm”

Finally got it running. Had to append ‘mySite’ to applicationHelper in Coldbox.cfc like so:

applicationHelper = “/mySite/includes/helpers/ApplicationHelper.cfm”