[coldbox-3.5.0-BE] ColdBoxSideBar reading xml file

I’ve just began using coldbox 3.5.0 and dloaded latest sidebar from forgebox. I’m looking for direction to get this sidebar working.

I’ve installed sidebar per the docs - and put the sidebar first in my coldbox system location - webroot /wwwroot/coldbox/system/interceptors/sidebar… and then when that failed, moved it into my cfbuilder project root /myprojectroot/interceptors/sidebar/… and I’m getting the generic xml error it seems when ColboxSideBar.cfc line 268 tries to read the xml file:



> # ColdBoxSideBar: xml file default properties read error. Check default ColdBoxSideBar.xml file .



> An error occurred when performing a file operation read on file /Applications/ColdFusion9/wwwroot/coldbox_project_3_5_0/ColdBoxSideBar.xml.

I thought since the error path listed didn’t have the fully qualified directory {system}/interceptors/sidebar/ that this CFC wasn’t finding the xml. I modified the ColdboxSideBar.cfc call (line 268 ) to point to (first) the system/interceptors/sidebar/ColdBoxSideBar.xml path - explicitly and got the same error with the new full path. Then (second) repeated the same exercise after I moved the sidebar install into a project directory & updated the ColdBoxSideBar.cfc line to look in my project’s interceptors - same results.

Here’s the ColdboxSideBar.cfc call (line 268 )
Ex. of literal path substitute

Then (third) I thought that file permission (on ColdBoxSideBar.xml) might be off somehow. But it’s consistent with other working xml files on my (local) web server.

Can you see what I’m failing to get right? Any help appreciated.

Matt did you follow the installation instructions for Sidebar, my guess is that you didn’t.

You should also know that ExpandPath will try to find the file from the given point, especially with your example. Secondly, placing it in the system interceptors is not the place either.

Thirdly, the instructions do give a very clear picture of how to install it.

Sorry for being so blunt about RTFM :frowning:

Yeah - I followed the sidebar installation instructions exactly as I understood them; that’s how I got as far as I did.

I guess there’s not much tolerance for those of us sincerely trying to do this verbatim from the docs/forums if we don’t already know how to do it.

  • ta

I only asked because the installation notes of sidebar say how to implement it, when I saw you say that you placed it in the core ColdBox I had to ask.

Matt

The sidebar was moved into forgebox from the core so I apologize for the instructions being weak. Please sen me your feedback do I can update the docs on it.

Hi folks,

ColdBox SEEK 3.5.2 Jeremiah 29:13

Have been struggling with the exact same problem as Matt M for the last few hours and have been driven demented trying to get the sidebar to work. I did RTFM but it is woefully out of date. Anyways, heres my instructions for anyone trying to get the sidebar to work - hope it’s of some help :o)

ColdBox SideBar

Just noticed that I forgot to mention to modify the path of the interceptor class to include the app name. Also, can anyone shed any light on what “ordering” is needed for the sidebar in this configuration??? Should the Sidebar just be placed last in the array??

//Register interceptors as an array, we need order
interceptors = [
//Autowire
{class=“coldbox.system.interceptors.Autowire”,
properties={}
},
//SES
{class=“coldbox.system.interceptors.SES”,
properties={}
},
// SideBar
{class=“myappname.interceptors.sidebar.ColdboxSideBar”,
properties={}
}
];

Oops, there was another change needed for the ExpandPath variable in ColdboxSideBar.cfc:

ColdBox SideBar

Download the ColdBoxSideBar zip file from ForgeBox.

Install into your application “interceptors” directory (not the coldbox/system/interceptors directory) under a directory called “sidebar”.

Note: You can change the location but you would then need to open the “ColdBoxSidebar.xml” (line 58) and update the following property:

interceptors/sidebar/includes/

Next, change line 224 of ColdboxSideBar.cfc from:

to

Next, change line 268 of ColdboxSideBar.cfc from:

to

Next, add the following property to the “settings” section of the Coldbox.cfc config file (a lot of the current documentation still seems to mention “YourSettings” in the older Coldbox.xml.cfm file which is confusing for ColdBox newbies):

settings = {

ColdBoxSideBar = true

};

Note: best to set this variable to be dependent on environment. Also works from the “coldbox” directives section.

Then add the following code to your interceptor definitions:

interceptors = [

{class=“myappname.interceptors.sidebar.ColdboxSideBar”, properties = {} }

];