Copy link to clipboard
Copied
Hello,
I'm using Application.cfc on local server for testing, and I'd like to test my site in a subfolder "/beta" on the remote server.
I'd like to have a Application.cfc in /beta/admin so to have different behaviours. So I used a ApplicationProxy.cfc in /beta/admin inheriting the Application.cfc of /beta, but I get the root one.
I think with Application.cfm would be easier: if there's none in that folder, the app looks for the above folder, and so on. So I could move folders without hassle.
But I need Orm also...
Any suggestion?
Thanks
I'd like to have a Application.cfc in /beta/admin so to have different behaviours. So I used a ApplicationProxy.cfc in /beta/admin inheriting the Application.cfc of /beta, but I get the root one.
The file in /beta/admin still needs to be Application.cfc. Just because you have another file in that dir that extends your root Application.cfc... doesnt mean CF knows to look for it. CF looks for Application.cfc, not ApplicationProxy.cfc.
The Application.cfc in /beta/admin should extend beta.Applicati
...Copy link to clipboard
Copied
There's no reason an App.cfc would automatically extend another unless you've explicitly told it to, are you sure your App.cfc in /beta isn't set to inherit anything?
The way you have it set up should work perfectly, as long as you've got a different this.Name for each Application? If you've copied the App.cfcs around you may have inadvertently named the two Apps the same.
O.
Copy link to clipboard
Copied
I'd like to have a Application.cfc in /beta/admin so to have different behaviours. So I used a ApplicationProxy.cfc in /beta/admin inheriting the Application.cfc of /beta, but I get the root one.
The file in /beta/admin still needs to be Application.cfc. Just because you have another file in that dir that extends your root Application.cfc... doesnt mean CF knows to look for it. CF looks for Application.cfc, not ApplicationProxy.cfc.
The Application.cfc in /beta/admin should extend beta.Application.
--
Adam
Copy link to clipboard
Copied
Actually I remembered I use the same application name because I want to share session values between the main application, and the admin folder... What a mess...