flarum无法打开mercury提示错误500
问题
当想打开mercury 看看有哪些插件有更新,但是提示错误无法看到,打开debug模式就会看到以下
类似错误
GET https://hacksnation.com/api/extiverse/mercury/extension-updates
Error: Call to a member function setAttribute() on null in /home/hacksnat/public_html/vendor/extiverse/api-client/src/Flarum/UpdatesChecker.php:27
Stack trace:
#0 /home/hacksnat/public_html/vendor/extiverse/mercury/src/Api/Controller/ExtensionsUpdatesController.php(27): Extiverse\Api\Flarum\UpdatesChecker->core()
#1 /home/hacksnat/public_html/vendor/flarum/core/src/Http/RouteHandlerFactory.php(41): Extiverse\Mercury\Api\Controller\ExtensionsUpdatesController->handle()
#2 /home/hacksnat/public_html/vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php(27): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}()
#3 /home/hacksnat/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ExecuteRoute->process()
可以试试删掉Extiverse 的key
解决方法:
方法一、在flarum所在的数据库,更新key
命令如下:
update settings set value='' where key ='extiverse-mercury.token';
如果不行,就选择删除key的方法
方法二、使用数据库命令删除(在 flarum 所在的数据库)
select * from settings where key ='extiverse-mercury.token';
方法三、打开phpMyAdmin 数据库管理页面,
1、进入flarum 所在的数据库
2、使用搜索功能,搜索 extiverse-mercury.token
就会找到(你也可以手动打开 settings 这栏在里面找)
3、编辑,删掉那串 key 值