You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a standard Grouper/Content model setup (Not dissimilar to djangocms-blog) where the publish/unpublish actions added via the StateIndicatorMixin do not work as expected and throw a 403 - CSRF token from POST incorrect.
From my testing this only occurs when we set CSRF_USE_SESSIONS = True in settings.py. Setting this to False gets things working again. Most other settings are reasonable defaults.
EDIT:
After deploying this to our development server it didn't actually fix the issue but now does raise something slightly more useful. With the setting marked as False I get
Description
I have a standard Grouper/Content model setup (Not dissimilar to djangocms-blog) where the publish/unpublish actions added via the
StateIndicatorMixin
do not work as expected and throw a 403 - CSRF token from POST incorrect.From my testing this only occurs when we set
CSRF_USE_SESSIONS = True
insettings.py
. Setting this toFalse
gets things working again. Most other settings are reasonable defaults.EDIT:
After deploying this to our development server it didn't actually fix the issue but now does raise something slightly more useful. With the setting marked as
False
I getUncaught TypeError: document.cookie.match(...) is null
from https://github.com/django-cms/djangocms-versioning/blob/master/djangocms_versioning/static/djangocms_versioning/js/indicators.js#L12Going back to a localhost instance with the setting as
True
Uncaught TypeError: window.top.CMS is undefined
from https://github.com/django-cms/djangocms-versioning/blob/master/djangocms_versioning/static/djangocms_versioning/js/indicators.js#L76Some other things:
Steps to reproduce
Expected behaviour
Page reloads and the object is marked as published/unpublished
Actual behaviour
403 CSRF error is raised.
Additional information (CMS/Python/Django versions)
CMS v4.1.1
Django 5.1.3
Djangocms-Versioning 2.1.0
Snippet
Do you want to help fix this issue?
The text was updated successfully, but these errors were encountered: