Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fusebox vs. cfinclude

Status
Not open for further replies.

simmerdown

Programmer
Jun 6, 2000
100
US
Inexplicably quirky errors are so fun.

In my main <cfswitch> statement, every <cfinclude> that calls a &quot;qry_[name].cfm&quot; template is throwing a 404 Not Found. But the really irking part is this ... if I introduce into that query file a nonexistent variable or something that I know will throw an error, the error is thrown - thus CF is finding the file. So then I return the query include to correctness, and CF says that it can't find the file again. I comment out the query include, and the display page then processes fine until it needs variables from the (now missing) query file. I uncomment the query include, and it 404s again.

I'm testing all of this on my local machine, so I'm absolutely sure

Here's the big chunk:[COLOR=003366]
Code:
<cfinclude template=&quot;app_locals.cfm&quot;>
<cf_bodycontent>
	<cfparam name=&quot;attributes.choice&quot; default=&quot;&quot;>
	<cfswitch expression=&quot;#attributes.choice#&quot;>
		<cfcase value=&quot;browsecatalog&quot;>
			<cfinclude template=&quot;qry_programs.cfm&quot;>
			<cfinclude template=&quot;dsp_programs.cfm&quot;>
		</cfcase>
		<cfcase value=&quot;browseprogram&quot;>
			<cfinclude template=&quot;qry_classes.cfm&quot;>
			<cfinclude template=&quot;dsp_classes.cfm&quot;>
		</cfcase>
		<cfcase value=&quot;browseclass&quot;>
			<cfinclude template=&quot;qry_class.cfm&quot;>
			<cfinclude template=&quot;dsp_class.cfm&quot;>
		</cfcase>
		<cfcase value=&quot;search&quot;>
			<cfinclude template=&quot;qry_search.cfm&quot;>
			<cfinclude template=&quot;dsp_searchresults.cfm&quot;>
		</cfcase>
		<cfcase value=&quot;list&quot;>
			<cfinclude template=&quot;dsp_list.cfm&quot;>
		</cfcase>
		<cfcase value=&quot;nocookies&quot;>
			<cfinclude template=&quot;dsp_nocookies.cfm&quot;>
		</cfcase>
		<cfdefaultcase>
			<cfinclude template=&quot;act_termcookie.cfm&quot;>
			<cfinclude template=&quot;qry_terms.cfm&quot;>
			<cfinclude template=&quot;dsp_home.cfm&quot;>
		</cfdefaultcase>
	</cfswitch>
</cf_bodycontent>
<cfinclude template=&quot;app_layout.cfm&quot;>
[code][/color]
Looks perfectly normal, right? Is there Something Obvious that I'm missing? Please clue me in, ask me to clarify, or suggest some things to test for ... left to myself, I'm gradually gaining a better understanding of those cartoons wherein smoke comes out of a person's ears.
 
What does your directory structure look like according to this script? - tleish
 
Right now it's all in one directory; I'm certain that the paths are all correct. Oh, that brings another thing to mind: one non-central part of this application will be in a subdirectory. When I was working with a file in that subdirectory yesterday, a cfinclude with a relative path of &quot;../qry_[name].cfm&quot; also insisted on throwing a 404.

I've made quadruply sure that the requested includes are where I'm saying they are. None are corrupted, missing, locked, read-only, moved, or otherwise AWOL.

Clarified?
 
An incorrect CFINCLUDE would not cause a 404 error. You would see a ColdFusion error instead. Check the URL's that you are getting a 404 error on.

A 404 error means there's no cfm page at the url you are accessing. - tleish
 
Boy do I feel sheepish now. It was a misdirected path for the header and footer files in my app_locals.cfm, which passes stuff along to the attributes scope, which is referenced by <cf_bodycontent>, which is called from index.cfm. Whew! And since the error being thrown appeared to be coming from index.cfm itself, thus my confusion.

Silly me.
 
It was a ColdFusion error that was being thrown, but it was HTTP/1.0 404 Object Not Found ColdFusion error. Sorry, I wasn't very specific.

Thanks for your interest
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top