Ummm... Doesn't sound right to me. Is there *any* chance the the file is being included in a different part of the code where the variable hasn't been initialised? It has to be something like that because included files see everything that exists at the point at which they are included...
One way out would be to have a <cfparam name="product_name" default=""> at the top of head.cfm and then do something to handle the invalid product_name. Cheers, Brett B) David Heacock 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 > > > > -- Brett Payne-Rhodes Eaglehawk Computing t: +61 (0)8 9371-0471 m: +61 (0)414 371 047 e: [EMAIL PROTECTED] w: http://www.yoursite.net.au --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
