JavaScript Lucee / AJAX / CFARGUMENT failing

I'm hitting a wall with an issue and it's been probably more hours than I care to admit tracking this thing down.

Specifically what I have is a jQuery AJAX call that posts some data to a .cfc I call the method and I pass in some arguments run a few database queries and then nothing is returned. I then use the success method of the AJAX function to continue on.

I developed this on a ColdFusion 11 server and it works a treat. However in my recent move to a Lucee server I am having all kinds of issues with this.

First I noticed that the success methods weren't being called. However Firebug is reporting a 200 OK on the call. So I checked further and the databases queries have all run within the method. Beyond that the Lucee logs looks clean as well and acknowledges that the database queries were run successfully. So everything is reporting fine (of the things I know to check). I have doen the basics and tried different machines and different browsers in the off chance this was specific, but nothing budged.

I noticed that Firefoxes Inspect Element was throwing a no element found error and upon further inspection it was returning that the arguments I was posting to the cfc were undefined. This cause me to dig a bit further and I noticed that it was returning this error 'XML Parsing Error: no element found' Still saying that the return was 200 OK, but not ok enough to go through to the success method of the AJAX call.

Other ideas I had and attempted with no real results were enabling CORS, including a returntype of JSON (which removed the XML error, but did little else).

Any ideas of what I can try, I'm starting to wonder if the entire Lucee setup was botched and I need to scrap it and reinstall?

Thanks for any help or ideas you can thrown in.

Edit: Apologies for not attaching code, as this appeared to be connected to a server set up I was naively hoping that someone would go, "Yeah you need to set this setting and modify this file and you're all good!" Then we'd all have a laugh at Tomcat.

I'm assuming with the first comment saying, "Show us your code!" that this is not the case. So taking the hint I put together a minimum test case which still confirms my original issue:

test.cfm

<!--- jQuery 2.1.4 --->
<script src="./jQuery-2.1.4.min.js"></script>

<script>
$(document).ready(function() {
    $.ajax({
        type: "post",
        url: "./test.cfc",
        data: {
            method: "test",
            var1: "var1",
            var2: "var2"
        },
        success: function(result) {
            alert('Hello Friend!');
        }
    });
});
</script>

test.cfc

<CFCOMPONENT>

    <!--- Test Function --->
    <CFFUNCTION NAME="test" ACCESS="remote">

        <CFARGUMENT NAME="var1" />
        <CFARGUMENT NAME="var2" />

        <CFOUTPUT>
            Var 1: #var1#<br />
            Var 2: #var2#
        </CFOUTPUT>

    </CFFUNCTION>
    <!--- End Test Function --->

</CFCOMPONENT>

And probably more important I'm on Lucee 4.5.1.023

As before any help is always greatly appreciated.

Answer:1

In iOS 9 beta, a bug (https://openradar.appspot.com/22186109) was introduced that meant that setting window.location.hash to some new value was not being updated until "some time" later. The exact ...

In iOS 9 beta, a bug (https://openradar.appspot.com/22186109) was introduced that meant that setting window.location.hash to some new value was not being updated until "some time" later. The exact ...

  1. window.location issue
  2. window.location safari issue
  3. window.location security issue
  4. window.location.href security issue
  5. window.location.href ie issue
  6. window.location.href fortify issue
  7. firefox window.location.reload issue

<ComponentB from="3/1/2016" to="12/1/2016" /> and in componentB's constructor I can do const { from, to } = this.props but my from to value is optional. I can't do this.state = { from, to } ...

<ComponentB from="3/1/2016" to="12/1/2016" /> and in componentB's constructor I can do const { from, to } = this.props but my from to value is optional. I can't do this.state = { from, to } ...

  1. destruction default value
  2. js destructure default value

$(window).scroll(function() { $scrollingDiv.css("display", (($(window).scrollTop() / $(document).height()) > 0.1) ? "block" : ""); }); How can I change the unit $(document).height()) > 0.1) ...

$(window).scroll(function() { $scrollingDiv.css("display", (($(window).scrollTop() / $(document).height()) > 0.1) ? "block" : ""); }); How can I change the unit $(document).height()) > 0.1) ...

  1. get document height using javascript

Input = ABCDEF ((3) abcdef),GHIJKLMN ((4)(5) Value),OPQRSTUVW((4(5)) Value (3)) Expected Output = ABCDEF,GHIJKLMN,OPQRSTUVW Tried so far Output = Input.replace(/ *\([^)]*\)*/g, "");

Input = ABCDEF ((3) abcdef),GHIJKLMN ((4)(5) Value),OPQRSTUVW((4(5)) Value (3)) Expected Output = ABCDEF,GHIJKLMN,OPQRSTUVW Tried so far Output = Input.replace(/ *\([^)]*\)*/g, "");