flag csrf_token AccessDeniedHttpException

Created on 7 August 2025, 3 months ago

Problem/Motivation

Getting constantly these errors :

Path: /flag/flag/like/12430/default?token=cBbBpCg6KzUMe86ZvdPSYTGFumpc8JkOmXCM_hgTosU&destination=/main&_wrapper_format=drupal_ajax. Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException: 'csrf_token' URL query argument is invalid. in Drupal\Core\Routing\AccessAwareRouter->checkAccess() (line 120 of /var/www/html/site/web/core/lib/Drupal/Core/Routing/AccessAwareRouter.php).

Steps to reproduce

login with user, flag something.
Login with the same user from different browser
Flag something again, and it throws errors.

I have this patch:
"drupal/flag": {
"flag cached views csrftoken":" https://www.drupal.org/files/issues/2025-03-13/flag-invalid-csrf-token-3... "
},

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Component

Flag core

Created by

🇫🇮Finland anaconda777

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024