Symfony: Debug Ajax Requests - ajax

community,
i have a symfony project (3.1.10) and use ajax requests (jquery.ajax) to load data. If the request fails, the debugger toolbar shows the error but creates no profiler entry, there is only a n/a in the profile column. So i have no chance to get the reason for the failing. I remember in symfony 2.7 there was a profiler entry for failed ajax requests. Can someone help me?

Make sure that the URL of your AJAX request actually uses the app_dev.php front controller. Otherwise no debug data is recorded for the profiler to display.

Seeing the same. But you know you always can open /_profiler/ page on your instance, find your ajax call and find out what happened.

Related

No Ajax Request in Yii2 debug module

Yii2 comes with a great debug module.
Sadly, I can not view Ajax request. It seems that only standard request show up in the log.
I would expect that under Requests/Last 10, I could go back to an Ajax POST request.
Is there a way to do that?
=====
Update: The accepted answer is correct. But, it turned out that my problem was elsewhere. I was running the site from a testscript with url: test.php/controller/action
In that case, Yii2 ActiveForm includes an action controller/action in the form. It omits the entry-script. I wonder if this is a bug? Or is this intended behavior?
Of course, my debug modules is only attached via the test entry-script, and therefore missed recording the ajax POST request.
Click on the icon with label "Yii Debugger" at the left side of the debug toolbar.
debug/default/index - here you can view latest requests. Filter Ajax only if needed.
Defailed info about request is available after clicking on the tag.

Recieving an AJAX CALL ERROR upon page load

Bear with me as this is my first question here. I will try to format it as best I can.
I have installed a contact form plugin to my wordpress site and after setting everything up, I am now getting an error when I load the page that states this:
AJAX CALL ERROR
Error: 0 error
Verify the attribute action of the form. It seems there is an error
I spoke with the developer and he is able to load it on his demo site, I ran the site in debug mode, and looked at the .htaccess information. He is telling me that there must be something wrong with the server configuration since it only shows on the front end. I don't see anything in the htaccess file which would cause this. I am not very familiar with Ajax or htaccess(a little but not much) so That is why I'm asking this here. Does anyone have a suggestion, because I'm at a loss right now. Thanks
Open up Chrome, go to "Tools" then "Developer Tools", then click on the "Network" tab, try to load the page and monitor the AJAX calls the form is making. You can click on them and look at the request and response headers and the content returned by all the AJAX calls. Find the one that is broken. Start your debugging there.
If the server is returning some sort of error, like a 500 error, then look at the contents of the page being returned, there may be a better error message there. If it's a 404 error, then you're form is trying to make an AJAX call to something the server can't find.

Primefaces Ajax response fail randomly

I am using p:datatable and on clicking of row (Command link) I am displaying a panel. Most of the time it is working fine but in regression testing some time it is getting hanged but request is going to ManageBean fetching all the data.
But it is not rendering the panel. This error has no specific pattern. I have put log in all possible place even in phaselistner lifecycle everything looks good.
I checked in firebug response is also coming. from server
I am using weblogic 10.3.6,primefaces 3.5 and internet explorer 9.x
Try putting in a component in the page where the data table lives. This displays Ajax events and alot more. Then compare the log output for when it succeeds against the output for when it fails. This may point to DOM as was suggested or somewhere else.

How to solve Firebug’s “Aborted” messages upon Ajax requests?

I am using Firebug 1.10.2 with Firefox 14.0.1. When showing a web page, the Firebug add-on has this "behavior": Firebug’s “Aborted” message upon Ajax request.
What should I make? Is it so dangerous that I must improve my web application because the presence of some error, or it is a Firebug bug or something else?
Please see the documentation of XHR open() for example here:
https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest
Note: Calling this method an already active request (one for which
open()or openRequest()has already been called) is the equivalent of
calling abort().
Just create a new XHR instance whenever you need one. Better yet, use jQuery or other JS library to do AJAX. It should shield you from these intricacies.
I saw this problem when trying to load a JavaScript file using HTTPS, but was serving the site on my local development environment using HTTP. The request to fetch the JavaScript file would fail with the Aborted message in FireBug. Making the requests use the same protocol worked for me.

Ajax updater not working in internet explorer

I have a problem with ajax updater that i couldnt solve.
I have this code Servicii
It works perfectly in firefox but in internet explorer it does nothing.Also if i open the site from my harddrive it works but it only works for the link once then i have to reload the whole page...
Does anybody have an ideea on how to solve this problem?
Thank you
I've had this exact problem. I'm assuming that you've got a function which periodically makes a request to the server to fetch data then updates the page if that data has changed since the last time you made the request.
Internet Explorer will cache the results of Ajax calls to the same resource even if you tell it not to in your HTTP headers. So if you make a request to get_data?id=whatever over and over again, IE will make the request once and then stop making it in the future and simply return the result of the first request.
The solution is to add a dummy parameter to the request string. So first you request get_data?id=whatever&ie_hack=0 then get_data?id=whatever&ie_hack=1 etc. This will stop IE from caching the results and force it to make the request each time, since it sees a different query string for each request.
I also ran into a problem like this, not with caching but with race conditions. IE executed the render part of the function before the any data was returned. Here's the issue, and solution:
Returned AJAX html breaks IE click events

Resources