Status/Resolution/Reason: Closed/Fixed/Fixed
Reporter/Name(from Bugbase): Michael Clark / Michael Clark ()
Created: 01/05/2017
Components: AJAX
Versions: 11.0
Failure Type: Non Functioning
Found In Build/Fixed In Build: CF11 Update 11 / 11,0,12,302319
Priority/Frequency: Normal / Some users will encounter
Locale/System: English / Win 2008 Server R2 64 bit
Vote Count: 4
Problem Description:
When creating a JavaScript proxy for a CFC using the CFAJAXPROXY tag, the generated <script> tags in the HTML source are placed at the bottom of the <head>. Before CF11 Update 11, they were placed at the top of the <head>. This causes the instantiation of the proxy to fail, as the proxy object has not yet been created.
Files containing the generated HTML source code both before and after applying Update 11 are attached.
Steps to Reproduce:
1. Create a CFC:
<cfcomponent displayname="Test">
<cffunction name="getText" output="false" access="remote" returntype="string">
<cfreturn "Hello" />
</cffunction>
</cfcomponent>
2. Create a CFM page:
<!DOCTYPE html>
<html lang="en">
<head>
<cfajaxproxy cfc="src.cfc.Test" jsclassname="Test">
<script>
var cfcTest = new Test();
console.log(cfcTest.getText());
</script>
</head>
<body>
</body>
</html>
3. Execute the CFM page.
Actual Result:
In the browser console, the following is displayed:
ReferenceError: Test is not defined
Expected Result:
In the browser console, the following should be displayed:
Hello
Any Workarounds:
Rollback to CF11 Update 10
Attachments:
- January 05, 2017 00:00:00: post_update_11.html
- January 05, 2017 00:00:00: pre_update_11.html
Comments: