404 for get_new_unread_message_count request

Created on 3 October 2024, 3 months ago

Problem/Motivation

I received 404 in console for /private-message/ajax-callback/get_new_unread_message_count?token=xxxx

Steps to reproduce

* Configure "Private Message Notification" block
* Clear the cache
* Log in
* Wait for an amount of time equal to the "Ajax refresh rate." Ajax is triggeredβ€”no issue occurs.
* check value of drupalSettings.privateMessageNotificationBlock.newMessageCountCallback in the console
* Log out
* Log in again as the same user
* Wait for an amount of time equal to the "Ajax refresh rate." Ajax is triggeredβ€”a 404 error is returned.
* Check value of drupalSettings.privateMessageNotificationBlock.newMessageCountCallback again, value is the same as during the first session

Proposed resolution

I logged 2 times but token value was the same.
Set the session context so the block will be cached per user and session, as the CSRF token is generated based on the session.

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡΅πŸ‡±Poland alorenc Wolsztyn, πŸ‡΅πŸ‡±

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024