This is the output - as you can see no errors and ...
# lucee
m
This is the output - as you can see no errors and CFC referenced fine
q
BTW, you should keep all the items in the message in a single thread so people can follow along.
a
^^^ yup. And also formatting yer code helps.
m
Sorry guys
q
BUT I'm not seeing your JS/HTML submit anything to the server.... Nothing shows up in the network activity, so this smells like a JS issue.
💯 1
a
@mauzer can you shift the rest of the stuff into this thread pls My first observation is that the insert logic is in a conditional block. Is the condition being met?
d
My question would be, where is the "obj" object you're referencing?
<cfset myArrayObj = obj.fn>
Could that be causing an error?
q
ALSO, if it does make it to the server, you aren't actually deseriailzing the JSON... you only do it in the dump. ALSO, i have no idea where obj.fn comes from that you are setting myArrayObj to... ALSO you are making the assumption that the array has at least one item.
So, when you migrated away from the CFM page, you didn't grab all the code, and even then, I don't think it was doing what you were expecting.
m
But why does it work in the cfm ? Exact same code but not in a cfc
q
Magic? If this is a copy/paste there is no reason why it should have worked there.
Again, if this is a straight copy/paste, I doubt it was doing what you wanted it do anyway... It was writing into the DB whatever was stored in obj.fn.... not what was coming from the AJAX call.
m
Thanks All revisiting it now. Many thanks
p
Can you put Sample code in an open gitHub repo?