AccessDeniedHttpException: csrf_token

Created on 17 February 2025, about 2 months ago

Problem/Motivation

Hi,

I am getting this error with a view which has nodes and flags and it uses infinity scroll.
The first flags can be flagged and unflagged without errors, but when scrolling down, and infinity scroll
creates new results, some of the flags are not working and creates this error for the user. "Oops something wen wrong, check your browser..."

Path: /flag/unflag/like/11962/default?destination=/node/6%3Fsort_by%3Dcomment_count&token=bpfVv1R-j6G3hKO_4O5s8FGy00TN9NJenVIm5GXm4OY&_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

1. Create nodes and add flags to them.
2. Display node field with views
3. add infinite scroll to the view automatic infinite scroll, 4 items, initially load one page
4. scroll the page down let the view load more results and click the flags, it should give that error on some of the flags.

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