Liste pages throws error 419, page expired

huangapple go评论51阅读模式
英文:

Liste pages throws error 419, page expired

问题

我刚刚升级到v6.0,遇到了所有页面显示419错误的问题。列表页面完全不起作用,创建页面在显示错误之前可以正常工作。

Laravel debugbar说这是CSRF不匹配的问题,控制台中出现了一些找不到资源的错误。

列出错误的截图

PHP版本:

PHP 8.2.0 (cli) (构建日期:2022年12月6日 15:31:23) (ZTS Visual C++ 2019 x64)
版权所有(c)The PHP Group
Zend引擎v4.2.0,版权所有(c)Zend Technologies
使用Zend Technologies的Zend OPcache v8.2.0,版权所有(c)
使用Derick Rethans的Xdebug v3.2.0RC1,版权所有(c)2002-2022

LARAVEL版本:

10.15.0.0

BACKPACK包版本:

backpack/basset: 1.0.0
backpack/crud: 6.0.5
backpack/generators: v4.0.0
backpack/permissionmanager: 7.0.0
backpack/theme-coreuiv2: 1.1.3

我尝试了多次遵循升级指南,确保没有跳过任何步骤,但无法使其正常工作。

我注意到存储链接存在问题,因为控制台中的链接显示了双斜杠。但在升级之前,这个功能正常运作,我以前从未遇到过这个问题。

英文:

I have just updated to v6.0 and I got an issue with all pages showing a 419 error. List pages don't work at all anymore and create pages work fine event with the error displayed first.

Laravel debugbar says it's a CSRF mismatch and I get errors in the console saying some assets are not found.

Screenshot of listed errors

PHP VERSION:

PHP 8.2.0 (cli) (built: Dec 6 2022 15:31:23) (ZTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.2.0, Copyright (c) Zend Technologies
with Zend OPcache v8.2.0, Copyright (c), by Zend Technologies
with Xdebug v3.2.0RC1, Copyright (c) 2002-2022, by Derick Rethans

LARAVEL VERSION:

10.15.0.0

BACKPACK PACKAGE VERSIONS:

backpack/basset: 1.0.0
backpack/crud: 6.0.5
backpack/generators: v4.0.0
backpack/permissionmanager: 7.0.0
backpack/theme-coreuiv2: 1.1.3

I tried following the upgrade guide several times while making sure I'm not skipping any steps but cannot get to get it to work.

I get there's an issue with storage link as the links in the console are showing double / on the url.
But this was working fine before the update and I've never got this thing.

答案1

得分: 0

有一个关于此问题的开放讨论 - 您可以尝试其中一些解决方案 - https://github.com/Laravel-Backpack/community-forum/discussions/576

  1. 尝试通过访问 /admin/logout URL 手动注销。
  2. 尝试使用 php artisan optimize:clear 删除所有缓存。
英文:

There's an open discussion here about it - you can try some of the solutions there - https://github.com/Laravel-Backpack/community-forum/discussions/576

  1. Try to manually log out by accessing the /admin/logout url)
  2. Try deleting all cache using php artisan optimize:clear

答案2

得分: 0

我遇到了同样的问题,它让我困扰了好几天。
你只需要在Laravel项目的.env文件中更改"APP_URL"变量即可。

我之前是这样的:"APP_URL=localhost",但那行不通。
后来我将它改成了"APP_URL=http:// movie.test",就好了。
要知道"http:// movie.test"是我为项目创建的本地域名。

所以你只需要将"APP_URL"变量改成正确的地址就行了。 Liste pages throws error 419, page expired

英文:

I had the same problem and it blocked me for days.
All you have to do is change the "APP_URL" variable in the .env file of the Laravel project.

Mine used to be "APP_URL=localhost", but that didn't work.
Then I changed it to "APP_URL=http:// movie.test" and it worked.
knowing that "http:// movie.test" is the local domain name I created for my project.

So all you have to do is change the "APP_URL" variable to the correct address. Liste pages throws error 419, page expired

huangapple
  • 本文由 发表于 2023年7月17日 19:29:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/76704016.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定