419 Page Expired #901
-
Hello to everyone, i'm getting a problem with my csrf token, i tried to change APP_URL in .env file but it doesn't work. It's seems weird, actually i'm using Laravel 11 and Backpack 6.7 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
i found the solution by myself, for everyone who's struggling about this error: go to a file named datatables_logic(vendor/backpack/crud/src/resources/views/crud/inc, i suggest to publish this file) and add csrf token in the ajax call(row 264), after that it will work!! |
Beta Was this translation helpful? Give feedback.
-
Hello @dylanpatriarchi Lucky us you decided to share the solution you found, because you should NOT be doing that. 👍 Let me try to help you fix this. I am sure we (Backpack) should be adding the CSFR token on datatables ajax calls automatically for you. The root cause for your error I think, it's because the assets are not properly loaded. The script that add the CSRF token automatically is located in I would first run a In case it is, I would open the Network Tools and verify if the file I mentioned is beeing properly loaded. If that doesn't help, please share more info about your setup, what's your Cheers |
Beta Was this translation helpful? Give feedback.
Hello @dylanpatriarchi
Lucky us you decided to share the solution you found, because you should NOT be doing that. 👍
Let me try to help you fix this. I am sure we (Backpack) should be adding the CSFR token on datatables ajax calls automatically for you.
The root cause for your error I think, it's because the assets are not properly loaded. The script that add the CSRF token automatically is located in
common.js
https://github.com/Laravel-Backpack/CRUD/blob/3ecaeffc603f0080ca4d5f7d108edca23e20b6af/src/resources/assets/js/common.js#L2I would first run a
php artisan basset:check
to make sure basset is properly handling your files.In case it is, I would open the Network Tools and verify if …