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
This weekend I've encountered some issue when I was trying to add a new element.
I've created a new Grid page, and tried to add a new element.
Then just nothing happens.
After some little investigation I've found a error in the console; GraphQL error: Invalid CSRF token
Seems like we need to catch this error and show something on the front-end like;
"Session expired! Please refresh the page".
Right now I'm not 100% sure if this issue only occurs in our Elemental Grid, or also on the DNADesign/silverstripe-elemental package without our Elemental Grid.
After some investigation, I found out that the console error is thrown inside the following vendor file; _resources/vendor/silverstripe/admin/client/dist/js/vendor.js
Reproduction steps
For security reasons, CSRF token will get invalidate when you open dev tools (F12) and view the admin in responsive.
So this makes it relative easy to reproduce the issue;
This weekend I've encountered some issue when I was trying to add a new element.
I've created a new Grid page, and tried to add a new element.
Then just nothing happens.
After some little investigation I've found a error in the console;
GraphQL error: Invalid CSRF token
Seems like we need to catch this error and show something on the front-end like;
"Session expired! Please refresh the page".
Right now I'm not 100% sure if this issue only occurs in our Elemental Grid, or also on the
DNADesign/silverstripe-elemental
package without our Elemental Grid.After some investigation, I found out that the console error is thrown inside the following vendor file;
_resources/vendor/silverstripe/admin/client/dist/js/vendor.js
Reproduction steps
For security reasons, CSRF token will get invalidate when you open dev tools (
F12
) and view the admin in responsive.So this makes it relative easy to reproduce the issue;
F12
(dev tools) => Toggle device toolbar (responsive view)The text was updated successfully, but these errors were encountered: