• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Coldfusion <cfoutput> and Location code: 26 error

exel

n00b
Joined
Jan 21, 2006
Messages
48
Hello,

I noticed a lot of "Location Code: 26" questions and very few answers on the net. I received this error code a few days ago and I narrowed it down to the <cfoutput> tags in my code.

I have a page with 20 <cfoutput> tags where I am retrieving 'city' and 'province' data from an Access 2002 database. The query to retrieve the 'city' returns 849 records and the query to retrieve the 'province' returns 112 records.

My code looks something like this:

Code:
<CFQUERY name="city_query" datasource="locationDB">
	SELECT *
	FROM Cities
	ORDER BY cityName;
</CFQUERY>

<CFQUERY name="province_query" datasource="locationDB">
	SELECT *
	FROM Provinces
	ORDER BY provName;
</CFQUERY>


<!--- the 1st CFOUTPUT section --->

<P><b>City</b><br />
<SELECT Name="Main_City">
	<CFOUTPUT QUERY="city_query">
		<OPTION VALUE=#cityID#>#cityName#</OPTION>
	</CFOUTPUT>
</SELECT></P>

<P><b>Province</b><br />
<SELECT Name="Main_Province">
	<CFOUTPUT QUERY="province_query">
		<OPTION VALUE=#provID#>#provName#</OPTION>
	</CFOUTPUT>
</SELECT></P>


.
.
.
. 
.
.
<!--- the 20th CFOUTPUT section --->

<P><b>City</b><br />
<SELECT Name="Main_City">
	<CFOUTPUT QUERY="city_query">
		<OPTION VALUE=#cityID#>#cityName#</OPTION>
	</CFOUTPUT>
</SELECT></P>

<P><b>Province</b><br />
<SELECT Name="Main_Province">
	<CFOUTPUT QUERY="province_query">
		<OPTION VALUE=#provID#>#provName#</OPTION>
	</CFOUTPUT>
</SELECT></P>


If all 20 <CFOUTPUT> tags are on the page, I receive this error:

Code:
Error Diagnostic Information

Request canceled or ignored by serverServer busy or unable to fulfill request. The server is unable to fulfill your request due to extremely high traffic or an unexpected internal error. Please attempt your request again (if you are repeatedly unsuccessful you should notify the site administrator). (Location Code: 26)


If only 19 <CFOUTPUT> tags are on the page, it works perfectly.

Any ideas how I can include the 20th <CFOUTPUT> tag?

EDIT: This is on a Coldfusion 5 server!

Thank you in advance!
 
without seeing your entire code its hard to offer the best solution.

I would however recommend setting application level variables for things such as states, provinces etc.. Certain things that do not change often should be cached to save resources.

Try setting an application level variable once in your application.cfm that contains a string of <option> tags. Then simply output that tag at compilation. This will greatly reduce the database calls.

Also you shouldn't NEED 20 cfoutput tags. I would recommend reevaluating which ones you can consolidate into a single output by using explicit variable names. i.e.. query.column if it doesn't need looping. Or you can also replace a couple cfoutput tags with cfloop with the query parameter
 
without seeing your entire code its hard to offer the best solution.

I would however recommend setting application level variables for things such as states, provinces etc.. Certain things that do not change often should be cached to save resources.

Try setting an application level variable once in your application.cfm that contains a string of <option> tags. Then simply output that tag at compilation. This will greatly reduce the database calls.

Also you shouldn't NEED 20 cfoutput tags. I would recommend reevaluating which ones you can consolidate into a single output by using explicit variable names. i.e.. query.column if it doesn't need looping. Or you can also replace a couple cfoutput tags with cfloop with the query parameter

You're right, I shouldn't need 20 cfoutput tags on a simple page. In fact, I don't even need to query the database. A simple workaround was to use javascript and stick the cities and provinces into arrays. The new code looks like this:

Code:
<script type="text/javascript">

   document.write("<select name='Main_City'>")
	for (x in city)
	{
		document.write("<option value=" + x + ">" + city[x] + "</option>")
	}
   document.write("</select>")

</script>
.
.
.

<script type="text/javascript">

   document.write("<select name='Main_Province'>")
	for (x in province)
	{
		document.write("<option value=" + x + ">" + province[x] + "</option>")
	}
   document.write("</select>")

</script>
 
while the javascript may have solved the issue, it offloads the workload to the end user's browser. You may find that the web page loading time may slow down. just a little fyi.
 
while the javascript may have solved the issue, it offloads the workload to the end user's browser. You may find that the web page loading time may slow down. just a little fyi.

Yes, the end user's browser will experience some latency. This is a temporary fix only.
 
Back
Top