提问前请务必仔细阅读如何排查故障和常见问题。
问题描述:
在此填写
FoF Links插件在自己链接时总提示:糟糕,出错啦!请刷新页面重试。
报错内容:
糟糕,出错啦!请刷新页面重试。
调试模式报错内容:
POST https://xxx.com/api/linksParseError: syntax error, unexpected ‘)’ in /www/wwwroot/xxx.com/vendor/fof/links/src/Command/CreateLinkHandler.php:52
Stack trace:
#0 /www/wwwroot/xxx.com/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile(‘/www/wwwroot/bb…’)
#1 [internal function]: Composer\Autoload\ClassLoader->loadClass(‘FoF\Links\Comma…’)
#2 [internal function]: spl_autoload_call(‘FoF\Links\Comma…’)
#3 /www/wwwroot/xxx.com/vendor/flarum/core/src/Bus/Dispatcher.php(20): class_exists(‘FoF\Links\Comma…’)
#4 /www/wwwroot/xxx.com/vendor/illuminate/bus/Dispatcher.php(88): Flarum\Bus\Dispatcher->getCommandHandler(Object(FoF\Links\Command\CreateLink))
#5 /www/wwwroot/xxx.com/vendor/illuminate/bus/Dispatcher.php(76): Illuminate\Bus\Dispatcher->dispatchNow(Object(FoF\Links\Command\CreateLink))
#6 /www/wwwroot/xxx.com/vendor/fof/links/src/Api/Controller/CreateLinkController.php(48): Illuminate\Bus\Dispatcher->dispatch(Object(FoF\Links\Command\CreateLink))
#7 /www/wwwroot/xxx.com/vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php(115): FoF\Links\Api\Controller\CreateLinkController->data(Object(Laminas\Diactoros\ServerRequest), Object(Tobscure\JsonApi\Document))
#8 /www/wwwroot/xxx.com/vendor/flarum/core/src/Api/Controller/AbstractCreateController.php(22): Flarum\Api\Controller\AbstractSerializeController->handle(Object(Laminas\Diactoros\ServerRequest))
#9 /www/wwwroot/xxx.com/vendor/flarum/core/src/Http/RouteHandlerFactory.php(38): Flarum\Api\Controller\AbstractCreateController->handle(Object(Laminas\Diactoros\ServerRequest))
#10 /www/wwwroot/xxx.com/vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php(27): Flarum\Http\RouteHandlerFactory->Flarum\Http{closure}(Object(Laminas\Diactoros\ServerRequest), Array)
#11 /www/wwwroot/xxx.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\ExecuteRoute->process(Object(Laminas\Diactoros\ServerRequest), Object(Closure))
#12 /www/wwwroot/xxx.com/vendor/flarum/core/src/Api/Middleware/ThrottleApi.php(33): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#13 /www/wwwroot/xxx.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Api\Middleware\ThrottleApi->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#14 /www/wwwroot/xxx.com/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(48): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#15 /www/wwwroot/xxx.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\CheckCsrfToken->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#16 /www/wwwroot/xxx.com/vendor/flarum/core/src/Http/Middleware/ResolveRoute.php(67): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#17 /www/wwwroot/xxx.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\ResolveRoute->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#18 /www/wwwroot/xxx.com/vendor/flarum/core/src/Http/Middleware/SetLocale.php(50): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#19 /www/wwwroot/xxx.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\SetLocale->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#20 /www/wwwroot/xxx.com/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(55): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#21 /www/wwwroot/xxx.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\AuthenticateWithHeader->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#22 /www/wwwroot/xxx.com/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(32): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#23 /www/wwwroot/xxx.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\AuthenticateWithSession->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#24 /www/wwwroot/xxx.com/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(51): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#25 /www/wwwroot/xxx.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\RememberFromCookie->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#26 /www/wwwroot/xxx.com/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#27 /www/wwwroot/xxx.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\StartSession->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#28 /www/wwwroot/xxx.com/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(29): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#29 /www/wwwroot/xxx.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Api\Middleware\FakeHttpMethods->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#30 /www/wwwroot/xxx.com/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#31 /www/wwwroot/xxx.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\ParseJsonBody->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#32 /www/wwwroot/xxx.com/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#33 /www/wwwroot/xxx.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\HandleErrors->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#34 /www/wwwroot/xxx.com/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(84): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#35 /www/wwwroot/xxx.com/vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#36 /www/wwwroot/xxx.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\RequestHandler->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#37 /www/wwwroot/xxx.com/vendor/middlewares/base-path-router/src/BasePathRouter.php(97): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#38 /www/wwwroot/xxx.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\BasePathRouter->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#39 /www/wwwroot/xxx.com/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(42): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#40 /www/wwwroot/xxx.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Laminas\Stratigility\Middleware\OriginalMessages->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#41 /www/wwwroot/xxx.com/vendor/middlewares/base-path/src/BasePath.php(53): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#42 /www/wwwroot/xxx.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\BasePath->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#43 /www/wwwroot/xxx.com/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(84): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#44 /www/wwwroot/xxx.com/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(73): Laminas\Stratigility\MiddlewarePipe->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\EmptyPipelineHandler))
#45 /www/wwwroot/xxx.com/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(96): Laminas\Stratigility\MiddlewarePipe->handle(Object(Laminas\Diactoros\ServerRequest))
#46 /www/wwwroot/xxx.com/vendor/flarum/core/src/Http/Server.php(42): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#47 /www/wwwroot/xxx.com/public/index.php(26): Flarum\Http\Server->listen()
#48 {main}
已尝试的解决办法:
网址: