This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Form submitting problem - missing a security token
#1

Hi Admin,

Thank you for your previous support.

I can't submit the form second time. First one was the successful test comment.

Error is showing : The form is missing a security token. Please try again.
Reply
#2

The script uses a session to prevent CSRF. So probably your session ended between your first comment and your second comment. That can happen if you wait too long or you clear your cookies for example.

Have you completed the interview?
Reply
#3

See this thread for more info. Please remember to search the forum first.
https://www.commentics.org/forum/showthr...p?tid=1333

Have you completed the interview?
Reply
#4

I have seen that thread but can't understand what to do.
Sould I remove this line? 
PHP Code:
<?php 
$json
['result']['error'] = $this->data['lang_error_csrf'];
Reply
#5

Either remove it or "comment it out" like this:

PHP Code:
<?php 
//$json['result']['error'] = $this->data['lang_error_csrf'];

Have you completed the interview?
Reply
#6

After disable this CSRF comment form started working. And after removing all test comment it is not working and showing "Your answer was incorrect" even I entered correct answer.

What is going wring?
Reply
#7

These are all session-based features that you're having a problem with. Did you add the session_start() code at the beginning of your file as suggested in the integration guide? How long are you waiting between the page loading and trying to post a comment? How long are sessions set to expire on your server? Are you viewing other pages where Commentics is integrated on your website after the page has loaded and before posting? Have you tested it on another browser?

Have you completed the interview?
Reply
#8

Hi ,

1. I added session_start()
2. I started commenting immediately after loading.
3. I don't know where to set sessions expire on my server.
4. No! only commentics admin panel remain opened on another tab.
5. It is working on another browser.

I think another page remain opened on my mobile and I am using a notebook over my mobile's hotspot internet.

It worked once after restart my notebook and mobile.( Hope it will work next time ).
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Zey
18-Apr-2019, 09:25 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)