Unable to add a comment to an attachment with 'required security token was not present' error

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

A Confluence user is unable to add a comment to an attachment in a page. Each time the save button is clicked, an error message 'Your request could not be processed because a required security token was not present in the request. You may need to re-submit the form or reload the page.' is displayed. This affects all users and all attachments.

Diagnosis

Try to perform the following steps to see if the issue persists before proceeding with the resolution:

  • Clear browser cache
  • Bypass proxy and use IP address to access Confluence
  • Disable XSRF Protection for adding comments
  • Check modified files via Confluence Admin >> System Information and revert the modifications (if exists)
  • If all the steps above don't help resolving the issue, trace the network with Firefox's Firebug, Chrome's Developer tools, or the same tools while replicating the issue. If the first POST message is immediately responded by 403 (forbidden) error, proceed with the resolution.

Cause

There are modified files in Confluence installation directory. These files are most likely located in <Confluence-Installation>/confluence/pages directory.

Resolution

  • Revert all the modification done in the following files:

    <confluence-installation>/confluence/pages/confirmattachmentremoval.vm
    <confluence-installation>/confluence/pages/confirmattachmentversionremoval.vm
    <confluence-installation>/confluence/pages/editattachment.vm
    <confluence-installation>/confluence/pages/handlenameconflicts.vm
    <confluence-installation>/confluence/pages/viewinfo.vm
    <confluence-installation>/confluence/pages/panels/reorder-page.vm
  • Restart Confluence

Last modified on Nov 2, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.