Skip to main content

Logged-in Users Get “Invalid Security Token” on First Comment Submission

After installing the FluentComments plugin, I noticed an issue when users are logged in and try to submit a comment. On the first click of the Submit button, it shows an error: “invalid security token.” However, if the user clicks the Submit button a second time, the comment is submitted successfully.

How can I fix this issue so that comments are submitted correctly on the first attempt?

Logged-in Users Get “Invalid Security Token” on First Comment Submission

Most probably the token could not be generated as the commect is too short. So when you start writing, FluentComments send an Ajax call and create a short lived token to verify. Most probably the token cold not be generated somehow.