tracker issue : CF-3836336

select a category, or use search below
(searches all categories and all time range)

cflocation does not work in Application.cfc

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/Duplicate

Reporter/Name(from Bugbase): Peter Boughton / Peter Boughton (Peter Boughton)

Created: 10/08/2014

Components: Language

Versions: 11.0

Failure Type: Non Functioning

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Critical / All users will encounter

Locale/System: ALL / Platforms All

Vote Count: 0

Duplicate ID:	CF-3760802

Problem Description:
A cflocation in Application.cfc throws an error instead of relocating.

Steps to Reproduce:

Create an Application.cfc as follows:

<cfcomponent output=false >
	<cfsetting enablecfoutputonly=true showdebugoutput=false />

		This.Name = "Enterprise_" & hash(getCurrentTemplatePath());


	<cffunction name="switchClientApplication" returntype="void" output="false" access="private">
		<cfargument name="SysName" type="String" required=true />

			<!--- [client detection here] --->

			<cfif true >
				<!--- No Client var, redirect to Home to login. --->
				<cflocation url="/home" />


	<!--- [rest of App.cfc] --->


Actual Result:

An error is thrown:

Could not process Application.cfc successfully for template <path>/index.cfm.

The error occurred in <path>/Application.cfc: line 18
Called from <path>/Application.cfc: line 7
Called from <path>/Application.cfc: line 18
Called from <path>/Application.cfc: line 7
16 : 			<cfif true >
17 : 				<!--- No Client var, redirect to Home to login. --->
18 : 				<cflocation url="/home" />
19 : 			</cfif>

Expected Result:

It should do the redirect, like it does in CF10 and Railo 4.

Any Workarounds:


----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3836336

External Customer Info:
External Company:  
External Customer Name: boughtonp
External Customer Email:  
External Test Config: My Hardware and Environment details:



Note: cfabort causes the same error.
Comment by External U.
10761 | October 08, 2014 11:20:04 AM GMT
This issue (cflocation and cfabort) is Duplicate of bug #CF-3760802 and has been fixed. The fix will be available in upcoming releases. (Comment added from ex-user id:amkum)
Comment by Adobe D.
10762 | October 22, 2014 06:05:08 AM GMT
Your issue statuses are incorrect: * An issue is not Closed/Fixed until the relevant update is publicly available - that is not the case with CF-3760802. * This issue was not Withdrawn - only a reporter can withdraw an issue, and I did not do that! Also, can you confirm: * The fix applies not just to the default constructor, but anywhere in Application.cfc * The fix is not just for cflocation and cfabort, but anywhere that exhibits this same behaviour - abort in cfscript, cfdump with abort attribute, writeDump with abort argument, etc. What specifically is "The fix will be available in upcoming releases" saying? i.e. why the plural, will it be in CF11 update 3 or not? Assuming it is, what is "upcoming"; when can we expect CF11 update 3 to be released? Within a fortnight? Within a month? Before the end of the year? Within six months? Where is the list of issues assigned to update 3? A search reveals only CF-3760802 is assigned to it.
Comment by External U.
10763 | October 22, 2014 06:47:33 AM GMT
Hi, Is this bug fixed? We're on CF11 Update 7 (Windows 2012 R2) and getting this error due to a cflocation in application.cfc
Comment by External U.
10764 | April 14, 2016 12:23:24 AM GMT
On CF11 having the same issue at times.
Comment by Richard F.
10765 | November 19, 2017 10:18:30 PM GMT