We're updating the issue view to help you get more done. 

LuceeAjax.js does not bind empty values

Description

In Lucee.ajaxProxy.invokeMethod, the javascript loops through any values that CF has requested to be bound to the proxy request, but it culls any null values here:

1 2 3 4 5 6 7 8 9 10 11 12 Lucee.ajaxProxy.invokeMethod = function(d, e, p) { var q = {}; for (var g in p) { if (typeof(p[g]) == "object") { for (var l in p[g]) { q[l] = p[g][l] } } else { if (p[g]) { // CULLING NULL VALUES q[g] = p[g] } }

Consequently, if you bind a DOM field with an empty string to your proxy object, it will not get passed at all, as opposed to being passed as an empty string. While there is an argument to be made that it should work that way, ACF does not work that way.

This is resolved in this PR (wasn't sure whether to submit it to the extension or the Lucee core):

https://github.com/lucee/extension-ajax/pull/3 – we just comment out the two 'if' lines. Presumably they were put there for a reason, so the comments were left in until this can be reviewed properly.

Status

Assignee

Michael Offner

Reporter

Samuel W. Knowlton

Labels

None

Sprint

None

Fix versions

Affects versions

5.3.2.24

Priority

New