House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Includes not found

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Hey all.
Adrian Lynch
05/21/08 06:21 A
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Adrian Lynch
05/21/2008 06:21 AM

Hey all. I have two apps(on two different servers), where I'm seeing errors stating that CF can't find a given include. The set-up is CF 8.0 on Windows 2003 with IIS 6 and SQL Server 2005 on both. In both cases I am using a mapping defined in App.cfc: <cfset THIS.mappings["/includes"] = "path\to\includes"> On one app the page looks like this: <cfinclude template="/includes/my-include.cfm"> Some basic CF and HTML <cfinclude template="/includes/my-other-include.cfm"> and the error comes from either of the include lines. 'Could not find the included template /includes/my-include.cfm.' or 'Could not find the included template /includes/my-other-include.cfm.'. I put this down to CF being under load and was willing to put up with it, but now on another app on a much better server with even less intensive code, I'm getting the same error. Has anyone else come across this before? Is it a known issue? Are there any solutions? Thanks. Adrian Lynch http://www.adrianlynch.co.uk/

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Cutter (CFRelated)
05/21/2008 06:38 AM

I ran into a similar issue a while back, and my problem was that the primary template I was calling was not within the same template as the Application.cfc. When Application.cfc runs on a page load it runs within the same directory space as the template originally called, thereby breaking your pathing. I got around this by referencing all of that pathing from the webroot of the site "/somefolder/anotherfolder/etc". Steve "Cutter" Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer _____________________________ http://blog.cutterscrossing.com Adrian Lynch wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Adrian Lynch
05/21/2008 07:16 AM

Are you saying my pathing is likely to be wrong? That was my first thought, but the page will error and a refresh will not show the error. If the pathing was wrong wouldn't it error on the same page all the time? I'm not sure where to go from here. I ran into a similar issue a while back, and my problem was that the primary template I was calling was not within the same template as the Application.cfc. When Application.cfc runs on a page load it runs within the same directory space as the template originally called, thereby breaking your pathing. I got around this by referencing all of that pathing from the webroot of the site "/somefolder/anotherfolder/etc". Steve "Cutter" Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer _____________________________ http://blog.cutterscrossing.com Adrian Lynch wrote: > Hey all. > > I have two apps(on two different servers), where I'm seeing errors stating > that CF can't find a given include. > > The set-up is CF 8.0 on Windows 2003 with IIS 6 and SQL Server 2005 on both. ----- Excess quoted text cut - see Original Post for more ----- included > template /includes/my-other-include.cfm.'. > > I put this down to CF being under load and was willing to put up with it, > but now on another app on a much better server with even less intensive > code, I'm getting the same error. > > Has anyone else come across this before? Is it a known issue? Are there any > solutions? > > Thanks. > > Adrian Lynch > http://www.adrianlynch.co.uk/


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference