Peter, setting MACHII_APP_KEY to this.name works just fine. Thank you
for the help!

On Sep 3, 11:29 am, "Peter J. Farrell" <[email protected]> wrote:
> Well, that narrows it down a bit knowing it's returning a "". Did
> everything work if you explicitly set the MACHII_APP_KEY in your
> Application.cfc as I suggested?
>
> I'll figure out what is going on here.  Might be a Adobe CF
> compatibility problem, because it works on Open BD.
>
> .Peter
>
> [email protected] said the following on 09/03/2009 11:13 AM:
>
> > I am running 1.8. Forgive me if I am doing something wrong, but when I
> > output
>
> > <cfoutput>I'm between quotes "#GetFileFromPath(GetDirectoryFromPath
> > (GetCurrentTemplatePath()))#"</cfoutput>
>
> > I just get an empty string. I'm doing this on my landing page.
>
> > On Sep 3, 10:55 am, "Peter J. Farrell" <[email protected]> wrote:
>
> >> What version of Mach-II are you running?  1.6.0, 1.6.1 or 1.8.0
>
> >> It's because StructGet has a problem with keys with "-" in them and if
> >> your app key has a "-" this can fail because we use the app key in the
> >> caching and logging systems.
>
> >> Does it work if you just set this in your Application.cfc (without
> >> modifying the mach-ii.cfc bootstrapper)?
>
> >> <cfset MACHII_APP_KEY = "default" />
>
> >> If that works, I suspect the auto-generated key to have something weird
> >> character in it.  It surprises me because we do this:
>
> >>     <cffunction name="getAppKey" access="public" returntype="string"
> >> output="false"
> >>         hint="Returns a clean AppKey.">
> >>         <cfreturn REReplace(MACHII_APP_KEY, "[[:punct:]|[:cntrl:]]", "",
> >> "all") />
> >>     </cffunction>
>
> >> To clean the app key up for use as struct key element.  What is the
> >> valid of this if you output this on a scribble page?
>
> >> <cfoutput>I'm between quotes 
> >> "#GetFileFromPath(GetDirectoryFromPath(GetCurrentTemplatePath()))#"</cfoutput>
>
> >> I suspect there is something wonky with that string.  If you can try
> >> what I suggested and post back, that would be great.
>
> >> Best,
> >> .Peter
>
> >> [email protected] said the following on 09/03/2009 09:58 AM:
>
> >>> Matt / Peter, Thank you guys so much for the quick response to this
> >>> question. I would have never been able to dig that deep into it. I
> >>> updated my mach-ii.cfc using the fix you posted in the Trac ticket.
>
> >>> Replacing:
>
> >>> <cfparam name="MACHII_APP_KEY" type="string" default="#GetFileFromPath
> >>> (ExpandPath('.'))#" />
>
> >>> with:
>
> >>> <cfparam name="MACHII_APP_KEY" type="string" default="#GetFileFromPath
> >>> (GetDirectoryFromPath(GetCurrentTemplatePath()))#" />
>
> >>> Now when I restart my cf instance and hit the site I get the following
> >>> error.
>
> >>> Expected structure key - received .; StructGet cannot be executed.
>
> >>> The error occurred in /opt/jrun4/servers/LiveBranch-SlingRocket/
> >>> cfusion.ear/cfusion.war/MachII/caching/strategies/TimeSpanCache.cfc:
> >>> line 395
> >>> Called from /opt/jrun4/servers/LiveBranch-SlingRocket/cfusion.ear/
> >>> cfusion.war/MachII/caching/strategies/TimeSpanCache.cfc: line 215
> >>> Called from /opt/jrun4/servers/LiveBranch-SlingRocket/cfusion.ear/
> >>> cfusion.war/MachII/caching/strategies/TimeSpanCache.cfc: line 151
> >>> Called from /opt/jrun4/servers/LiveBranch-SlingRocket/cfusion.ear/
> >>> cfusion.war/MachII/framework/RequestRedirectPersist.cfc: line 76
> >>> Called from /opt/jrun4/servers/LiveBranch-SlingRocket/cfusion.ear/
> >>> cfusion.war/MachII/framework/RequestManager.cfc: line 97
> >>> Called from /opt/jrun4/servers/LiveBranch-SlingRocket/cfusion.ear/
> >>> cfusion.war/MachII/framework/AppManager.cfc: line 94
> >>> Called from /opt/jrun4/servers/LiveBranch-SlingRocket/cfusion.ear/
> >>> cfusion.war/MachII/framework/AppFactory.cfc: line 246
> >>> Called from /opt/jrun4/servers/LiveBranch-SlingRocket/cfusion.ear/
> >>> cfusion.war/MachII/framework/AppLoader.cfc: line 136
> >>> Called from /opt/jrun4/servers/LiveBranch-SlingRocket/cfusion.ear/
> >>> cfusion.war/MachII/framework/AppLoader.cfc: line 75
> >>> Called from /opt/jrun4/servers/LiveBranch-SlingRocket/cfusion.ear/
> >>> cfusion.war/MachII/mach-ii.cfc: line 122
> >>> Called from /opt/jrun4/servers/LiveBranch-SlingRocket/cfusion.ear/
> >>> cfusion.war/MachII/mach-ii.cfc: line 75
>
> >>> 393 :      <cffunction name="getStorage" access="private"
> >>> returntype="struct" output="false"
> >>> 394 :              hint="Gets a reference to the cache data storage.">
> >>> 395 :              <cfreturn StructGet(getScope() & "." & getScopeKey()) 
> >>> />
> >>> 396 :      </cffunction>
> >>> 397 :
>
> >>> Let me know if there is any other information I can provide you with.
>
> >>> On Sep 2, 3:29 pm, Matthew Woodward <[email protected]> wrote:
>
> >>>> Thanks Peter--very interesting. I'll write something up on the wiki (I'm
> >>>> assuming it isn't there already).
>
> >>>> Just so it's clear, this happens even for non-ajax calls, and the really
> >>>> weird part is the apparent involvement with the session timeout.
>
> >>>> BTW, I promised Brandon if we found an issue we'd name the bug after
> >>>> him. :-)
>
> >>>> Peter J. Farrell wrote:
>
> >>>>> Brandon, thanks for discussing this issue with Matt.  A ticket was
> >>>>> filed and thanks for the sample application that demonstrated this
> >>>>> strange behavior:
>
> >>>>>http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/ticket/373
>
> >>>>> Looks like CVSDude is doing some scheduled maintenance right now, but
> >>>>> the fix is to defined a MACHII_APP_KEY in your Application.cfc.  The
> >>>>> problem is the auto app key computation uses the directory and calling
> >>>>> an AJAX template in another folder causes the app key to change.  
> >>>>> Setting the MACHII_APP_KEY in your Application.cfc will fix this 
> >>>>> problem.
>
> >>>>> We will be discussing ways to fix this in 1.8, but it appears this
> >>>>> problem existed all the way back to 1.5.0.
>
> >>>>> Best,
> >>>>> .Peter
>
> >>>> --
> >>>> Matthew Woodward
> >>>> [email protected]http://www.mattwoodward.com/blog
>
> >>>> Please do not send me proprietary file formats such as Word, PowerPoint, 
> >>>> etc. as 
> >>>> attachments.http://www.gnu.org/philosophy/no-word-attachments.html
>
> >>>>  smime.p7s
> >>>> 4KViewDownload
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to Mach-II for CFML list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/mach-ii-for-coldfusion?hl=en
SVN: http://greatbiztoolsllc.svn.cvsdude.com/mach-ii/
Wiki / Documentation / Tickets: 
http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/
-~----------~----~----~----~------~----~------~--~---

Reply via email to