详情描述:
我的论坛迁移了一下,换了服务器,全部插件重装,数据库不变,发帖后出现错误
报错内容:
Next Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '22' for key 'discussions.PRIMARY' (SQL: insert into `discussions` (`is_approved`, `title`, `slug`, `created_at`, `user_id`, `is_private`) values (1, 发帖测试, 发帖测试, 2020-07-19 12:51:49, 4, 0)) in /data/wwwroot/community.wvbtech.com/vendor/illuminate/database/Connection.php:664
Stack trace:
#0 /data/wwwroot/community.wvbtech.com/vendor/illuminate/database/Connection.php(624): Illuminate\Database\Connection->runQueryCallback()
#1 /data/wwwroot/community.wvbtech.com/vendor/illuminate/database/Connection.php(459): Illuminate\Database\Connection->run()
#2 /data/wwwroot/community.wvbtech.com/vendor/illuminate/database/Connection.php(411): Illuminate\Database\Connection->statement()
#3 /data/wwwroot/community.wvbtech.com/vendor/illuminate/database/Query/Processors/Processor.php(32): Illuminate\Database\Connection->insert()
#4 /data/wwwroot/community.wvbtech.com/vendor/illuminate/database/Query/Builder.php(2628): Illuminate\Database\Query\Processors\Processor->processInsertGetId()
#5 /data/wwwroot/community.wvbtech.com/vendor/illuminate/database/Eloquent/Builder.php(1338): Illuminate\Database\Query\Builder->insertGetId()
#6 /data/wwwroot/community.wvbtech.com/vendor/illuminate/database/Eloquent/Model.php(823): Illuminate\Database\Eloquent\Builder->__call()
#7 /data/wwwroot/community.wvbtech.com/vendor/illuminate/database/Eloquent/Model.php(788): Illuminate\Database\Eloquent\Model->insertAndSetId()
#8 /data/wwwroot/community.wvbtech.com/vendor/illuminate/database/Eloquent/Model.php(651): Illuminate\Database\Eloquent\Model->performInsert()
#9 /data/wwwroot/community.wvbtech.com/vendor/flarum/core/src/Discussion/Command/StartDiscussionHandler.php(78): Illuminate\Database\Eloquent\Model->save()
#10 /data/wwwroot/community.wvbtech.com/vendor/illuminate/bus/Dispatcher.php(90): Flarum\Discussion\Command\StartDiscussionHandler->handle()
#11 /data/wwwroot/community.wvbtech.com/vendor/illuminate/pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}()
#12 /data/wwwroot/community.wvbtech.com/vendor/illuminate/pipeline/Pipeline.php(104): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#13 /data/wwwroot/community.wvbtech.com/vendor/illuminate/bus/Dispatcher.php(98): Illuminate\Pipeline\Pipeline->then()
#14 /data/wwwroot/community.wvbtech.com/vendor/illuminate/bus/Dispatcher.php(76): Illuminate\Bus\Dispatcher->dispatchNow()
#15 /data/wwwroot/community.wvbtech.com/vendor/flarum/core/src/Api/Controller/CreateDiscussionController.php(72): Illuminate\Bus\Dispatcher->dispatch()
#16 /data/wwwroot/community.wvbtech.com/vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php(96): Flarum\Api\Controller\CreateDiscussionController->data()
#17 /data/wwwroot/community.wvbtech.com/vendor/flarum/core/src/Api/Controller/AbstractCreateController.php(22): Flarum\Api\Controller\AbstractSerializeController->handle()
#18 /data/wwwroot/community.wvbtech.com/vendor/flarum/core/src/Http/RouteHandlerFactory.php(38): Flarum\Api\Controller\AbstractCreateController->handle()
#19 /data/wwwroot/community.wvbtech.com/vendor/flarum/core/src/Http/Middleware/DispatchRoute.php(65): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}()
#20 /data/wwwroot/community.wvbtech.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\DispatchRoute->process()
#21 /data/wwwroot/community.wvbtech.com/vendor/flarum/core/src/Http/Middleware/SetLocale.php(50): Laminas\Stratigility\Next->handle()
#22 /data/wwwroot/community.wvbtech.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\SetLocale->process()
#23 /data/wwwroot/community.wvbtech.com/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(45): Laminas\Stratigility\Next->handle()
#24 /data/wwwroot/community.wvbtech.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\CheckCsrfToken->process()
#25 /data/wwwroot/community.wvbtech.com/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(55): Laminas\Stratigility\Next->handle()
#26 /data/wwwroot/community.wvbtech.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\AuthenticateWithHeader->process()
#27 /data/wwwroot/community.wvbtech.com/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(32): Laminas\Stratigility\Next->handle()
#28 /data/wwwroot/community.wvbtech.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\AuthenticateWithSession->process()
#29 /data/wwwroot/community.wvbtech.com/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(51): Laminas\Stratigility\Next->handle()
#30 /data/wwwroot/community.wvbtech.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\RememberFromCookie->process()
#31 /data/wwwroot/community.wvbtech.com/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Laminas\Stratigility\Next->handle()
#32 /data/wwwroot/community.wvbtech.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\StartSession->process()
#33 /data/wwwroot/community.wvbtech.com/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(29): Laminas\Stratigility\Next->handle()
#34 /data/wwwroot/community.wvbtech.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Api\Middleware\FakeHttpMethods->process()
#35 /data/wwwroot/community.wvbtech.com/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Laminas\Stratigility\Next->handle()
#36 /data/wwwroot/community.wvbtech.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\ParseJsonBody->process()
#37 /data/wwwroot/community.wvbtech.com/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle()
#38 /data/wwwroot/community.wvbtech.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\HandleErrors->process()
#39 /data/wwwroot/community.wvbtech.com/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(84): Laminas\Stratigility\Next->handle()
#40 /data/wwwroot/community.wvbtech.com/vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process()
#41 /data/wwwroot/community.wvbtech.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\RequestHandler->process()
#42 /data/wwwroot/community.wvbtech.com/vendor/middlewares/base-path-router/src/BasePathRouter.php(97): Laminas\Stratigility\Next->handle()
#43 /data/wwwroot/community.wvbtech.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\BasePathRouter->process()
#44 /data/wwwroot/community.wvbtech.com/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(42): Laminas\Stratigility\Next->handle()
#45 /data/wwwroot/community.wvbtech.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Laminas\Stratigility\Middleware\OriginalMessages->process()
#46 /data/wwwroot/community.wvbtech.com/vendor/middlewares/base-path/src/BasePath.php(53): Laminas\Stratigility\Next->handle()
#47 /data/wwwroot/community.wvbtech.com/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\BasePath->process()
#48 /data/wwwroot/community.wvbtech.com/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(84): Laminas\Stratigility\Next->handle()
#49 /data/wwwroot/community.wvbtech.com/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(73): Laminas\Stratigility\MiddlewarePipe->process()
#50 /data/wwwroot/community.wvbtech.com/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(96): Laminas\Stratigility\MiddlewarePipe->handle()
#51 /data/wwwroot/community.wvbtech.com/vendor/flarum/core/src/Http/Server.php(42): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#52 /data/wwwroot/community.wvbtech.com/public/index.php(26): Flarum\Http\Server->listen()
#53 {main}
已尝试的解决办法:
关闭FoF Gamification,无用