CF9 and mach-ii properties bleed over

18 views
Skip to first unread message

Karstengp

unread,
Feb 6, 2012, 12:50:24 PM2/6/12
to mach-ii-for...@googlegroups.com
I recently upgraded from CF8 to CF9 on my development system, I'm running Mach-ii 1.8 - fresh download this morning.  Currently I have 7 projects that are using Mach-ii, so to save on space I loaded the files in one location and mapped the folder in the CF administrator.  This has been working for the past two years in CF8 with no problems. 

After upgrading to CF9, Mach-ii sees the proper properties folder for the first site I visit.  When I load any subsequent site, it appears to be pulling the cached properties of the first site instead of pulling the properties the requested site.  It is having no issue with the model or views only the properties.  As I said this was not an issue in CF8 and nothing else has changed on my system.

Has anyone else encountered this problem?  I appreciate any help  

Peter J. Farrell

unread,
Feb 6, 2012, 12:53:34 PM2/6/12
to mach-ii-for...@googlegroups.com
Karstengp said the following on 02/06/2012 11:50 AM:

> I recently upgraded from CF8 to CF9 on my development system, I'm
> running Mach-ii 1.8 - fresh download this morning. Currently I have 7
> projects that are using Mach-ii, so to save on space I loaded the
> files in one location and mapped the folder in the CF administrator.
> This has been working for the past two years in CF8 with no problems.
Can you show an example of the XML include you are using in your Mach-II
file? Also, are you using a rather generic name for your mappings? CF9
changes some of the path caching behind the scenes that has causes
issues for non-Mach-II apps too.

>
> After upgrading to CF9, Mach-ii sees the proper properties folder for
> the first site I visit. When I load any subsequent site,
> it appears to be pulling the cached properties of the first site
> instead of pulling the properties the requested site. It is having no
> issue with the model or views only the properties. As I said this was
> not an issue in CF8 and nothing else has changed on my system.
>

What are the settings on the Caching page in the CFIDE?

--
Peter J. Farrell
pe...@mach-ii.com
p...@maestropublishing.com
http://blog.maestropublishing.com
Identi.ca / Twitter: @maestrofjp

Karstengp

unread,
Feb 6, 2012, 1:12:50 PM2/6/12
to mach-ii-for...@googlegroups.com
Here is the property section in my mach-ii config:

<properties>
<property name="applicationRoot" value="/" />
<property name="defaultEvent" value="publicHome" />
<property name="eventParameter" value="event" />
<property name="parameterPrecedence" value="form" />
<property name="maxEvents" value="10" />
<property name="exceptionEvent" value="exception" />
<!-- Search engine friendly URLs -->
<property name="urlParseSES" value="true" />
<property name="urlDelimiters" value="/|/|/" />
<property name="urlBase" value="/index.cfm" /> 
<property name="urlExcludeEventParameter" value="true"/> <!-- for 1.8 -->
<!-- Application properties formerly placed in the Application.cfc -->
<!-- Self awareness properties i.e. upload folder, location on the server etc. -->
<property name="applicationProperty" type="properties.applicationProperty" />
<!-- SDG Facades for this application -->
<property name="sessionProperty" type="properties.SessionProperty" />
</properties>

I am using the standard mapping logical path of MachII.

Cache Settings
Max number of cached templates: 1024
Trusted cache: Off
Save class files: On
Cache web server paths: Off
Maximum number of cached queries: 100



Peter J. Farrell

unread,
Feb 6, 2012, 1:21:00 PM2/6/12
to mach-ii-for...@googlegroups.com
Karstengp said the following on 02/06/2012 12:12 PM:
<property name="applicationProperty" type="properties.applicationProperty" />
<property name="sessionProperty" type="properties.SessionProperty" />
This is the issue. CF9 seems to have changed the way the compute the hash for the their cache key for CFCs.

I ran into this same problem last week on CF9 on a non-Mach-II application.  I had two separate applications with "controllers.jfp" CFC in them but they were different because one app is public facing and the other is the admin application.  Which ever app started up first got the CFC path cache.

The solution is to create an app spectific mapping in your Application.cfc and use that mapping to create unique CFC paths:

<property name="applicationProperty" type="myApp.properties.applicationProperty" />
<property name="sessionProperty" type="myApp.properties.SessionProperty" />
HTH,
.Peter

Sumit Verma

unread,
Feb 6, 2012, 1:31:12 PM2/6/12
to mach-ii-for...@googlegroups.com
Or, you can turn the component cache off in CF admin.

 
Sumit Verma
Partner / Vice President | ten24, LLC
office: 877.886.5806 x 103 | mobile: 617.290.8214
www.ten24web.com | www.linkedin.com/in/sverma | twitter: blogonria


--
To post to this group, send email to mach-ii-for...@googlegroups.com
For more options and to unsubscribe, visit this group at http://groups.google.com/group/mach-ii-for-coldfusion?hl=en
 
SVN: http://svn.mach-ii.com/machii/
Wiki / Documentation / Tickets: http://trac.mach-ii.com/machii/

Karstengp

unread,
Feb 6, 2012, 2:21:23 PM2/6/12
to mach-ii-for...@googlegroups.com
Thanks Peter,

After adding the following line in my Application.cfc file

<cfset this.mappings["/ALP"] = GetDirectoryFromPath( GetCurrentTemplatePath() ) />

And updating my mach-ii config to the following

<property name="applicationProperty" type="ALP.properties.applicationProperty" />
<property name="sessionProperty" type="ALP.properties.SessionProperty" />

everything worked

Peter J. Farrell

unread,
Feb 6, 2012, 2:26:59 PM2/6/12
to mach-ii-for...@googlegroups.com
Fabulous...could you write a short explanation of the problem and the
fix for the wiki? I even started a page for it and linked it from the
documentation. This is the benefit of open source - realtime help!

http://trac.mach-ii.com/machii/wiki/FAQ-CF9-properties-listeners-cached-wrongly

Karstengp said the following on 02/06/2012 01:21 PM:

> --
> To post to this group, send email to
> mach-ii-for...@googlegroups.com
> For more options and to unsubscribe, visit this group at
> http://groups.google.com/group/mach-ii-for-coldfusion?hl=en
>
> SVN: http://svn.mach-ii.com/machii/
> Wiki / Documentation / Tickets: http://trac.mach-ii.com/machii/

Karstengp

unread,
Feb 8, 2012, 12:05:58 PM2/8/12
to mach-ii-for...@googlegroups.com
I've got the notes on the wiki..
Reply all
Reply to author
Forward
0 new messages