tracker issue : CF-4203380

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

Error in cfajaxproxy target incorrectly returns 'not found' error instead of real error details.

| View in Tracker

Status/Resolution/Reason: To Test//Fixed

Reporter/Name(from Bugbase): Matthew Hunnell / ()

Created: 10/16/2018

Components: AJAX

Versions: 13.0

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 2018.0.01.3 /

Priority/Frequency: Normal / Some users will encounter

Locale/System: / Windows 10

Vote Count: 0

ColdFusion 2018.0.01.3
Problem Description:If there are certain (syntax?) bugs in a cfc that is used for cfajaxproxy, the resulting error will incorrectly be 'specified file xxxxxx could not be found' instead of correctly showing the syntax error details. It makes development difficult. 

Here is test code:
CFM that uses proxy:
<cfajaxproxy cfc="testfile" jsclassname="p" />
<script type="text/javascript">
function runTest() {
	var instance = new p();
	instance.setHTTPMethod("POST");
	var result = instance.testProxy('Test String');
	alert(result);
}
</script>
<input type="button" value="Try it!" onClick="javascript:runTest();" />

TestFile.cfc file that is target of proxy: 
<cfcomponent>
	<cffunction name="testProxy" access="remote" returntype="string" output="no">
		<cfargument name="var1" type="string" required="true">
   		
   		<cfif (1=1> <!---  ERROR!!!!! here  --->
   			<cfset local.returnVar = 'test 1'>
   		<cfelse>
   			<cfset local.returnVar = 'test 2'>
   		</cfif>

        <cfreturn local.returnVar>
    </cffunction>	
</cfcomponent>

PS -- CF2018 is not a choice when creating a bug.

Attachments:

Comments: