Ajax request problem: error 80020101

You can also get this error if you’re doing an AJAX call from jQuery and you pass an extra comma on the end of the array, like so: $.post(‘http://example.com/example1/’,{ field1:sField1, field2:sField2, field3:sField3, field4:sField4, field5:sField5, },function(sData){ if (console) { console.log(sData); } }); See that comma after the sField5? That’s the syntax error. No other browser will … Read more

java.lang.IllegalStateException: CDATA tags may not nest

There’s an exception being thrown during rendering the JSF response caused by a bug in your code. However, Mojarra in turn failed to properly handle this exception with the builtin ajax exception handler, causing another exception which you’re now seeing, hiding away all detail about the original exception. Look closer at the stack trace. Start … Read more

jQuery AJAX ‘multipart/form-data’ Not Sending Data?

You have to pass the FormData object as the data parameter var request = new FormData(); $.each(context.prototype.fileData, function(i, obj) { request.append(i, obj.value.files[0]); }); request.append(‘action’, ‘upload’); request.append(‘id’, response.obj.id); $.ajax({ type : ‘POST’, url : context.controller, data : request, processData : false, contentType : false, success : function(r) { console.log(r); //if (errors != null) { } else … Read more

How to use Ajax within Sonata Admin forms?

I was able to make this work a few months back. While what a.aitboudad has shared is accurate. There are a few gotcha’s that first timers with Symfony/Sonata might face. Here are the steps. 1> Extend Sonata CRUD’s edit.html.twig / base_edit.html.twig . For simplicity, I’ll use only the latter. Copy vendor/bundles/Sonata/AdminBundle/Resources/views/CRUD/base_edit.html.twig into the views folder … Read more