Hi everyone,
I have this strange bug that profiles will only open when clicking on them from a thread. When visiting the profile URL (or refreshing the page) it will give an error.
Examples on my site (NSFW SITE):
Try clicking on the username xanas111, and then try to refresh the page
https://forum.example.net/d/37-xanas-arts
Errors seen:
example.net Forum
Search Forum
404
GET https://forum.example.net/api/users/Vladimirthepimp
{
"errors": [
{
"status": "404",
"code": "not_found",
"detail": "Illuminate\\Database\\Eloquent\\ModelNotFoundException: No query results for model [Flarum\\User\\User]. in /home.md10/home/forum.example.net/public_html/vendor/illuminate/database/Eloquent/Builder.php:452\nStack trace:\n#0 /home.md10/home/forum.example.net/public_html/vendor/flarum/core/src/User/UserRepository.php(40): Illuminate\\Database\\Eloquent\\Builder->firstOrFail()\n#1 /home.md10/home/forum.example.net/public_html/vendor/flarum/core/src/Api/Controller/ShowUserController.php(61): Flarum\\User\\UserRepository->findOrFail(NULL, Object(Flarum\\User\\Guest))\n#2 /home.md10/home/forum.example.net/public_html/vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php(96): Flarum\\Api\\Controller\\ShowUserController->data(Object(Zend\\Diactoros\\ServerRequest), Object(Tobscure\\JsonApi\\Document))\n#3 /home.md10/home/forum.example.net/public_html/vendor/flarum/core/src/Http/RouteHandlerFactory.php(38): Flarum\\Api\\Controller\\AbstractSerializeController->handle(Object(Zend\\Diactoros\\ServerRequest))\n#4 /home.md10/home/forum.example.net/public_html/vendor/flarum/core/src/Http/Middleware/DispatchRoute.php(65): Flarum\\Http\\RouteHandlerFactory->Flarum\\Http\\{closure}(Object(Zend\\Diactoros\\ServerRequest), Array)\n#5 /home.md10/home/forum.example.net/public_html/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\\Http\\Middleware\\DispatchRoute->process(Object(Zend\\Diactoros\\ServerRequest), Object(Closure))\n#6 /home.md10/home/forum.example.net/public_html/vendor/flarum/core/src/Http/Middleware/SetLocale.php(50): Zend\\Stratigility\\Next->handle(Object(Zend\\Diactoros\\ServerRequest))\n#7 /home.md10/home/forum.example.net/public_html/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\\Http\\Middleware\\SetLocale->process(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))\n#8 /home.md10/home/forum.example.net/public_html/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(23): Zend\\Stratigility\\Next->handle(Object(Zend\\Diactoros\\ServerRequest))\n#9 /home.md10/home/forum.example.net/public_html/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\\Http\\Middleware\\CheckCsrfToken->process(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))\n#10 /home.md10/home/forum.example.net/public_html/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(55): Zend\\Stratigility\\Next->handle(Object(Zend\\Diactoros\\ServerRequest))\n#11 /home.md10/home/forum.example.net/public_html/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\\Http\\Middleware\\AuthenticateWithHeader->process(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))\n#12 /home.md10/home/forum.example.net/public_html/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(32): Zend\\Stratigility\\Next->handle(Object(Zend\\Diactoros\\ServerRequest))\n#13 /home.md10/home/forum.example.net/public_html/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\\Http\\Middleware\\AuthenticateWithSession->process(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))\n#14 /home.md10/home/forum.example.net/public_html/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(51): Zend\\Stratigility\\Next->handle(Object(Zend\\Diactoros\\ServerRequest))\n#15 /home.md10/home/forum.example.net/public_html/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\\Http\\Middleware\\RememberFromCookie->process(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))\n#16 /home.md10/home/forum.example.net/public_html/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Zend\\Stratigility\\Next->handle(Object(Zend\\Diactoros\\ServerRequest))\n#17 /home.md10/home/forum.example.net/public_html/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\\Http\\Middleware\\StartSession->process(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))\n#18 /home.md10/home/forum.example.net/public_html/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(29): Zend\\Stratigility\\Next->handle(Object(Zend\\Diactoros\\ServerRequest))\n#19 /home.md10/home/forum.example.net/public_html/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\\Api\\Middleware\\FakeHttpMethods->process(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))\n#20 /home.md10/home/forum.example.net/public_html/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Zend\\Stratigility\\Next->handle(Object(Zend\\Diactoros\\ServerRequest))\n#21 /home.md10/home/forum.example.net/public_html/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\\Http\\Middleware\\ParseJsonBody->process(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))\n#22 /home.md10/home/forum.example.net/public_html/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Zend\\Stratigility\\Next->handle(Object(Zend\\Diactoros\\ServerRequest))\n#23 /home.md10/home/forum.example.net/public_html/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\\Http\\Middleware\\HandleErrors->process(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))\n#24 /home.md10/home/forum.example.net/public_html/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(83): Zend\\Stratigility\\Next->handle(Object(Zend\\Diactoros\\ServerRequest))\n#25 /home.md10/home/forum.example.net/public_html/vendor/middlewares/request-handler/src/RequestHandler.php(84): Zend\\Stratigility\\MiddlewarePipe->process(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))\n#26 /home.md10/home/forum.example.net/public_html/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\\RequestHandler->process(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))\n#27 /home.md10/home/forum.example.net/public_html/vendor/middlewares/base-path-router/src/BasePathRouter.php(97): Zend\\Stratigility\\Next->handle(Object(Zend\\Diactoros\\ServerRequest))\n#28 /home.md10/home/forum.example.net/public_html/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\\BasePathRouter->process(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))\n#29 /home.md10/home/forum.example.net/public_html/vendor/zendframework/zend-stratigility/src/Middleware/OriginalMessages.php(41): Zend\\Stratigility\\Next->handle(Object(Zend\\Diactoros\\ServerRequest))\n#30 /home.md10/home/forum.example.net/public_html/vendor/zendframework/zend-stratigility/src/Next.php(60): Zend\\Stratigility\\Middleware\\OriginalMessages->process(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))\n#31 /home.md10/home/forum.example.net/public_html/vendor/middlewares/base-path/src/BasePath.php(53): Zend\\Stratigility\\Next->handle(Object(Zend\\Diactoros\\ServerRequest))\n#32 /home.md10/home/forum.example.net/public_html/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\\BasePath->process(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\Next))\n#33 /home.md10/home/forum.example.net/public_html/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(83): Zend\\Stratigility\\Next->handle(Object(Zend\\Diactoros\\ServerRequest))\n#34 /home.md10/home/forum.example.net/public_html/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(72): Zend\\Stratigility\\MiddlewarePipe->process(Object(Zend\\Diactoros\\ServerRequest), Object(Zend\\Stratigility\\EmptyPipelineHandler))\n#35 /home.md10/home/forum.example.net/public_html/vendor/zendframework/zend-httphandlerrunner/src/RequestHandlerRunner.php(95): Zend\\Stratigility\\MiddlewarePipe->handle(Object(Zend\\Diactoros\\ServerRequest))\n#36 /home.md10/home/forum.example.net/public_html/vendor/flarum/core/src/Http/Server.php(44): Zend\\HttpHandlerRunner\\RequestHandlerRunner->run()\n#37 /home.md10/home/forum.example.net/public_html/index.php(22): Flarum\\Http\\Server->listen()\n#38 {main}"
}
]
}