Applications bleeding through to each other

One thing after another…

I have two websites, setup as two Vhosts in Apache and BD7. I get errors on one website saying a resource doesn’t exist. However, the resource should not exist and should not be requested from that app, that resource is being used in the other app. For instance, I get an error on the northeastassembly.org website saying the vehicles table does not exists. However, the vehicle table is a table in the toyhookupinc.com website. I get an error on the toyhookupinc.com website saying a query is not defined in the request collection, but my guess is that the handler with the same name in the northeastassembly.org site is being requested rather than the handler for the toyhookupinc.com site. I hope that makes sense.

Now, here is what I have in the Application.cfc for both websites:

<cfset this.name = hash(getCurrentTemplatePath())>

That should map to different directories and therefore each application should have a separate name.

In the coldbox.xml.cfm config for each app I have different values set for the AppName setting.

Of coarse, I do have the file cache set to cache per website. If I didn’t do that there would be major “bleeding” problems. Is there something else that could cause this behavior?

Thanks again, sorry for the constant trouble I am having lately.

-Aaron

I would also append a name to the name in the application.cfc

<cfset this.name = “My App_” & hash(getCurrentTemplatePath())>

As for it bleeding, I don’t know how bluedragon does its file caching. Each coldbox controller is per application, so if the application names are the same, then you will be seeing weird stuff. The appname in the coldbox.xml if for reference only.

What I am not familiar, is the file cache you talk about.

Luis

If you go to northeastassembly.org or toyhookupinc.com and look at the
tag context you will notice that templates are being used from
/home/northeast/public_html/ and /home/toyz/public_html/ which are two
different web roots. Why is this happening?

Thanks for helping me,
Aaron

Good morning Luis.

The file caching is nothing different, just that in ColdFusion it is
set by default and the in BD you have to explicitly set it to cache
per website.

I will append the site name as you recommended but I am wondering if
there is more to it. Please look at the tag context as I mentioned in
my previous post.

Thanks,
Aaron

Try it without the file caching, just to rule that one out.

LUis.

This might be a bluedragon issue Aaron!! Maybe that is why you are getting so much conflicting trouble.

Luis

I'm not setting it to cache or not to cache, but to cache each website
independent of each other. I'll go ahead and set it off and let you
look at what happens - just for kicks I guess.

Go ahead and take a look at northeastassembly.org, it will give you
the toyhookupinc.com website without any images and such.

-Aaron

Perhaps, everything does work as expected on my local dev machine
where I am running CF8. I'm guessing it may be BD or my apache
configuration.

I think we've ruled out the idea I had that since both sites were
setup with the same/similar architecture that model.myobject in one
app didn't know how to differentiate between model.myobject in another
app.

Maybe I'll post to the BD interest list.

Thanks,
Aaron

Luis,

Gregg from New Atlanta said the following:

Your last description show symptoms of “Cache per website” not really enabled. With caching per page name without respect for the hostname, the first site visited is always displayed.

However, is this what was really happening? The last runtime error message I saw showed the following file hierarchy. The problem seems to be that Coldbox is “switching” the doc-root. I’m not familiar enough with Coldbox and your configuration, but it looks like coldbox.cfc is calling controller.cfc that is in the “base” doc-root. Is this expected? Is this the problem?

/home/northeast/public_html/index.cfm
|
+-- /home/northeast/public_html/Application.cfc
|
+-- /home/northeast/public_html/coldbox/system/coldbox.cfc
|
+-- /home/toyz/public_html/coldbox/system/controller.cfc
|
+-- /home/toyz/public_html/controllers/main.cfc
|
+-- /home/toyz/public_html/model/cart/gCheckoutCart.cfc

Somebody from Viviotech thought that the problem might be due to caching in ColdBox. Could this be?

Thanks,
Aaron

Aaron,

Where are your inheriting from?

/home/northeast/public_html/Application.cfc
|
+-- /home/northeast/public_html/coldbox/system/coldbox.cfc
|
+-- /home/toyz/public_html/coldbox/system/controller.cfc
|
+-- /home/toyz/public_html/controllers/main.cfc
|
+-- /home/toyz/public_html/model/cart/gCheckoutCart.cfc

Coldbox.cfc is the inherited parent from Application.cfc
Then this component is the front controller that instantiates the controller.cfc and all your handlers etc. It looks in its instantiated directory, wherever coldbox.cfc is located. So if its switching, there has to be something weird going on with your setup in the caching. Try deleting it from app scope and re-creating it. Also, make sure you don’t have any CF Mappings that point to the other location>

Hi Aaron,

As you have create coldbox mapping to /home/coldbox

Could you please modify the controller.cfc
Line 229
servicePath = “coldbox.system.services.loaderService”;

Line 232
servicePath = “coldbox.system.services.exceptionService”;

I am sure then it should load, as I changed my controller.cfc , it works

Thanks
Sana

Here is my Vhost definitions:

Section 3: Virtual Hosts

Vince from New Atlanta had me upgrade to BD 7.0.1 saying that 7 had problems with CFC caching and now it appears to work. Man, three days wasted over a bug in BD 7.

Thanks for all your help. I’ll let you know if my rejoicing turns to mourning (if things start going sour again).

-Aaron