419 page expired after upgrading to backpack 6 (and Laravel 10) #576
-
Hi, I just finished all the upgrade steps to upgrade to BP 6 (from 5). I now get a message 419 page expired when I edit a crud. I know this has to do with CSRF tokens but I cannot explain why this is the case. Did I miss a step? |
Beta Was this translation helpful? Give feedback.
Replies: 11 comments 11 replies
-
Hey @de-raaf-media I've experienced this myself and was due to permissions in the storage folder. I experienced this with Homestead, is that what you are using ? I tried it on windows, and had to make some changes in the vagrant file to assign the www-user as the owner of the project, has "vagrant" was taking over it. Also I was trying to use a custom folder: If not you can also try a Let me know how it goes. |
Beta Was this translation helpful? Give feedback.
-
Hi Pedro, I cleared the cache in the last step of the upgrade. php artisan config:clear I now also cleared basset. There is now a basset folder in my storage so that seems to work fine. I am using Laravel Valet by the way. It seems to be related to XHR routes like admin/page/search. Mark |
Beta Was this translation helpful? Give feedback.
-
Maybe it's a session issue? Do you have the same problem in an incognito window @de-raaf-media ? If so, a force logout would probably fix it (manually access the |
Beta Was this translation helpful? Give feedback.
-
Are you sure your |
Beta Was this translation helpful? Give feedback.
-
Tell me what is the value of APP_URL now in the file .env ?
Le jeu. 20 juil. 2023 à 21:31, Joaquín Borges ***@***.***> a
écrit :
… I use 127.0.0.1:8000/admin to access, what should I put in my APP_URL?
—
Reply to this email directly, view it on GitHub
<#576 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVO4E5VZ2X2TGNM23FL63SDXRGIQJANCNFSM6AAAAAA2MXWXPE>
.
You are receiving this because you commented.Message ID:
<Laravel-Backpack/community-forum/repo-discussions/576/comments/6503319@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
try to change it to
APP_URL=127.0.0.1/8000
save the file and refresh the web page
Le ven. 21 juil. 2023 à 02:08, Joaquín Borges ***@***.***> a
écrit :
… APP_URL=127.0.0.1
—
Reply to this email directly, view it on GitHub
<#576 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVO4E5REIA5JRKXLLACM5VTXRHJARANCNFSM6AAAAAA2MXWXPE>
.
You are receiving this because you commented.Message ID:
<Laravel-Backpack/community-forum/repo-discussions/576/comments/6504717@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
ooh my bad, instead APP_URL=127.0.0.1:8000
not /8000
Le ven. 21 juil. 2023 à 08:10, fabrice tokoudagba ***@***.***>
a écrit :
… try to change it to
APP_URL=127.0.0.1/8000
save the file and refresh the web page
Le ven. 21 juil. 2023 à 02:08, Joaquín Borges ***@***.***>
a écrit :
> APP_URL=127.0.0.1
>
> —
> Reply to this email directly, view it on GitHub
> <#576 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AVO4E5REIA5JRKXLLACM5VTXRHJARANCNFSM6AAAAAA2MXWXPE>
> .
> You are receiving this because you commented.Message ID:
> <Laravel-Backpack/community-forum/repo-discussions/576/comments/6504717@
> github.com>
>
|
Beta Was this translation helpful? Give feedback.
-
Tried both but no success |
Beta Was this translation helpful? Give feedback.
-
I found the solution guys!!! There is a file named datatables_logic.blade.php which has configurations for an AJAX request at line 266: I added:
and it worked!!! |
Beta Was this translation helpful? Give feedback.
-
I have implemented all the suggestions here and there has been no change still. On the list page, the 419 error only shows on a frame which disappears after you click outside but, then, the Data is not listed which is the actual concern. I have cleared cache all the time. What more is there to do please? |
Beta Was this translation helpful? Give feedback.
-
I'm getting the same error on a clean installation of Backpack 6 on Laravel 10. My issue was with the new Basset library and a local Docker environment. I had to add the |
Beta Was this translation helpful? Give feedback.
Are you sure your
APP_URL
is set correctly in your.ENV
file?