If you need to test it, wrap the cfouput of the var in a try and catch the
error of use the isDefined() function.  Also just output some non cf html or
text in the head.cfm file to text if it is actually being called or not.
 
Again you are using a local var so i dont see where the application scope is
coming into play here.  Is the "product_name" var being set within a
condition?  Maybe the condition is not being met and the var isnt being set.
 
Also, might be just me, but setting vars in templates like that and
expecting it is going to be in your other templates is a very bad idea.
 
Steve

  _____  

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Scott Barnes
Sent: Saturday, 5 July 2008 7:37 PM
To: [email protected]
Subject: [cfaussie] Re: cfinclude and parent document variables


I tried the same situation on my HostMySite.com account and it worked aok?
either you're on a seperate box to me or somethings a miss in the code. I
don't think Application scope is at play here as in theory if 4 people are
on the box and 3 of them are constantly clearing the Application scope, the
only way for it to affect all 4 is if they all share the same scopename?
 
My memory is rusty but doesn't cfinclude distill down into the one class (or
is that cfmodule)? could that be the faultline?
 


 
On Thu, Jul 3, 2008 at 8:45 PM, <[EMAIL PROTECTED]> wrote:



You would get this issue if head.cfm is included with cfmodule or as a
tag instead of cfinclude. Except for a change in scope I'm not sure
how this could happen.

Blair


On 7/3/08, David Heacock <[EMAIL PROTECTED]> wrote:
>
> I've got the strangest problem... I'm using a cheap CF hosting company
> HostMySite.com. I have a page that sets a simple variable:
>
> <cfset product_name = "Smood">
>
> then includes a file that does some stuff:
>
> <cfinclude template="/includes/head.cfm">
>
> The strange thing is that head.cfm sometimes (not always, which is
> odd) can't see the variable 'product_name' in the parent document. Am
> I losing the plot or is this freaky? It's not that it gets the wrong
> variable (like with a caching problem), it just can't see it at all
> and throws a null pointer exception.
>
>
> Any ideas here?
>
>
> Cheers
>
> David Heacock
> >
>






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
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/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to