Forum
Blog comment not always sent
Hello,
My blog comments not always make it to to the admin area. I am sending the data with ajax $post
and sending them to the form's action
attribute which is the current slug. When debugging the js I can see the request done correctly, the form data are in the request too and the response is OK. However the comments don't appear in the backend. Sometimes it just works but can't figure out what is different between the cases. The only think I've observed is that when it fails, the request is done almost instantly while the succesful posts take some sensible time.
Do you have any ideas? Is there any code sample I could share and would be helpfull?
Thanks a lot!
Have you tried turning debug on?
Yes but since there is no page refresh I don't see anything there.
I think I found the problem.
Looks like comments fail when I have a seesion open in another tab. I figured it out after deleting the cookies in my frontend and the next comment post was successfull. the
PHPSESSID
cookie was the one that made the difference.Do you know if there is a way to work around this?
A session for the Perch control panel, or a session for your site?
Whell, whatever it was it was temporary :(. I closed all tabs removed cookies and it failed again. So let's take it from the begining. Is there any way I can get usefull debugging data from the backend in my case?
Yes, you can turn debug on as suggested. If your JavaScript is preventing you seeing that, disable your JavaScript until you're sure you've got it working.