Cfc function does not receive arguments when called from javascript via cfajaxproxy

I started this problem when installing ColdFusion 2016 Update 4.

HTML:

<input type='button' name='btn' value='Click me' onclick='proxyFunc();'> 

Proxy server:

 <cfajaxproxy cfc='proxy' jsClassName="jsProxyClass" > 

Javascript:

 proxyFunc = function () { var proxyObj = new jsProxyClass(); proxyObj.setHTTPMethod("post"); proxyObj.setCallbackHandler (function (result) { console.log(result); }); proxyObj.func('X'); } 

CFC:

 <cffunction name='func' access='remote' returntype='string' > <cfargument name='arg' type='string' required='false' > <cfreturn 'What is my arg? ' & arguments.arg> </cffunction> 

I set a breakpoint in my cfc and found that arguments.arg is not full and I have form.argumentcollection = {"arg": "X"}

If I change setHTTPMethod from "post" to "get", arguments.arg = "X", as expected.

I have a lot of code that worked perfectly before this CF update, and now it's all broken :(

Any help would be greatly appreciated. Thanks in advance.

+7
javascript coldfusion ajax parameters
source share
1 answer

I found this patch that Adobe posted https://tracker.adobe.com/#/view/cf-4198589 and it worked for me.

+4
source share

All Articles