Recieving an AJAX CALL ERROR upon page load - ajax

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.

Related

Laravel vapor returns message:null when click on browser back button

I recently started using Laravel vapor as my server and I've realized that when I click on the browser back (history) button, I get this weird message:
Image of the returned message
Did anyone have this issue?
I have no idea which part of the code to share with you that would be relevant for this issue since I didn't find any similar problem on the internet.
If you need something, comment and I will edit the question.
This is most likely due to you having a route with the same path for displaying and getting JSON data. The browser may cache the JSON version and show that when hitting the back button.
If you could share the relevant routes that match, I can go into more detail.

Symfony: Debug Ajax Requests

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.

Fiddler traffic shows 404 error website still loads

I am somewhat of a novice at debugging web traffic, so I am simply trying to understand what is going on.
I have fiddler and am using it to look at the network traffic being sent as I navigate to a specific website. I am noticing that the traffic picks up an HTTP 404 error thrown but I am still able to load the website.
Please help me understand how it still loads the website when it throws an HTTP 404 error? The error is never shown to the user. It is like it is ignoring it. I would think it would display the error to user and never load the website.
I have attached a picture of what I am seeing in Fiddler.
thanks
FiddlerTrafficwith404error
One of the reasons for this behavior is the browser stores the page in cache that is already loaded in browser once. Try opening the page in incognito/private mode (depending upon what your browser calls it) or try clearing your browser's cache and history.

Html5 pushstate internal service error when page refresh, or view source code

i am attempting to copy a tutorial example found here http://html5.gingerhost.com/ but whenever i try to refresh the page it takes me to a "500 Internal Server Error". also when i click the link and the page loads the other content, when i look at the source code it only shows my another "500 Internal Server Error"
please help!
thanks alot!
This is because the server needs to be able to understand the URLs too. So for example, you're page is at http://example.com. You use a link's click event to make it http://example.com/more-info. But if http://example.com/more-info doesn't exist on the server, refreshing the page won't work properly because the browser won't know that /more-info is actually part of the index page. So pushstate only works if the client and the server both recognise the new URLs.

Using AJAX to send an email

I am attempting to make an AJAX contact form with Webscript (http://webscript.io), but I am running into a problem. Without AJAX, the form worked well and the email was delivered. After trying to add AJAX functionality, I stopped receiving emails through the form, yet the AJAX appears to run successfully. Here is a JS Bin with my example code: http://jsbin.com/aqahok/1/edit. I have a feeling the problem doesn't lie in the Webscript (which I believe you cannot view) but in the JS since the form worked without AJAX.
Thank you for taking a look at my problem and feel free to ask me any questions you may have.
Your JavaScript is looking for input[name="message"], but it should be looking for textarea[name="message"]. I changed that and tried to send an email. It appears to have worked (no error), so hopefully that's it.
The JS Bin you created makes webscript.io return 500 Internal Server Error (you can see it in Firebug or Chrome Dev Tools). AJAX part just does not check response and show the "Contact Form Submitted!". So problem is on their side.

Resources