Here are the full logs of the error I’m having. This is completely breaking the functionality of my forum, so if anyone could tell me what to do, I would appreciate it.
Next Illuminate\Database\QueryException: SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP FOREIGN KEY `badge_category_id`; check that it exists (SQL: alter table `badges` drop foreign key `badge_category_id`) in /home/metaqymo/public_html/vendor/illuminate/database/Connection.php:712
Stack trace:
#0 /home/metaqymo/public_html/vendor/illuminate/database/Connection.php(672): Illuminate\Database\Connection->runQueryCallback('alter table `ba...', Array, Object(Closure))
#1 /home/metaqymo/public_html/vendor/illuminate/database/Connection.php(490): Illuminate\Database\Connection->run('alter table `ba...', Array, Object(Closure))
#2 /home/metaqymo/public_html/vendor/illuminate/database/Schema/Blueprint.php(109): Illuminate\Database\Connection->statement('alter table `ba...')
#3 /home/metaqymo/public_html/vendor/illuminate/database/Schema/Builder.php(364): Illuminate\Database\Schema\Blueprint->build(Object(Illuminate\Database\MySqlConnection), Object(Illuminate\Database\Schema\Grammars\MySqlGrammar))
#4 /home/metaqymo/public_html/vendor/illuminate/database/Schema/Builder.php(211): Illuminate\Database\Schema\Builder->build(Object(Illuminate\Database\Schema\Blueprint))
#5 /home/metaqymo/public_html/vendor/v17development/flarum-user-badges/migrations/2021_02_23_16_23_add_badges_category_relationship.php(17): Illuminate\Database\Schema\Builder->table('badges', Object(Closure))
#6 [internal function]: Illuminate\Filesystem\Filesystem::{closure}(Object(Illuminate\Database\Schema\MySqlBuilder))
#7 /home/metaqymo/public_html/vendor/flarum/core/src/Database/Migrator.php(194): call_user_func(Object(Closure), Object(Illuminate\Database\Schema\MySqlBuilder))
#8 /home/metaqymo/public_html/vendor/flarum/core/src/Database/Migrator.php(213): Flarum\Database\Migrator->runClosureMigration(Array, 'down')
#9 /home/metaqymo/public_html/vendor/flarum/core/src/Database/Migrator.php(174): Flarum\Database\Migrator->resolveAndRunClosureMigration('/home/metaqymo/...', '2021_02_23_16_2...', 'down')
#10 /home/metaqymo/public_html/vendor/flarum/core/src/Database/Migrator.php(156): Flarum\Database\Migrator->runDown('/home/metaqymo/...', '2021_02_23_16_2...', Object(Flarum\Extension\Extension))
#11 /home/metaqymo/public_html/vendor/flarum/core/src/Extension/Extension.php(501): Flarum\Database\Migrator->reset('/home/metaqymo/...', Object(Flarum\Extension\Extension))
#12 /home/metaqymo/public_html/vendor/flarum/core/src/Extension/ExtensionManager.php(337): Flarum\Extension\Extension->migrate(Object(Flarum\Database\Migrator), 'down')
#13 /home/metaqymo/public_html/vendor/flarum/core/src/Extension/ExtensionManager.php(350): Flarum\Extension\ExtensionManager->migrate(Object(Flarum\Extension\Extension), 'down')
#14 /home/metaqymo/public_html/vendor/flarum/core/src/Extension/ExtensionManager.php(271): Flarum\Extension\ExtensionManager->migrateDown(Object(Flarum\Extension\Extension))
#15 /home/metaqymo/public_html/vendor/flarum/core/src/Api/Controller/UninstallExtensionController.php(42): Flarum\Extension\ExtensionManager->uninstall('v17development-...')
#16 /home/metaqymo/public_html/vendor/flarum/core/src/Api/Controller/AbstractDeleteController.php(24): Flarum\Api\Controller\UninstallExtensionController->delete(Object(Laminas\Diactoros\ServerRequest))
#17 /home/metaqymo/public_html/vendor/flarum/core/src/Http/RouteHandlerFactory.php(41): Flarum\Api\Controller\AbstractDeleteController->handle(Object(Laminas\Diactoros\ServerRequest))
#18 /home/metaqymo/public_html/vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php(27): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}(Object(Laminas\Diactoros\ServerRequest), Array)
#19 /home/metaqymo/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ExecuteRoute->process(Object(Laminas\Diactoros\ServerRequest), Object(Closure))
#20 /home/metaqymo/public_html/vendor/fof/reactions/src/Middleware/BindRequestToContainer.php(35): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#21 /home/metaqymo/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): FoF\Reactions\Middleware\BindRequestToContainer->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#22 /home/metaqymo/public_html/vendor/flarum/core/src/Api/Middleware/ThrottleApi.php(33): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#23 /home/metaqymo/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Api\Middleware\ThrottleApi->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#24 /home/metaqymo/public_html/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(44): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#25 /home/metaqymo/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\CheckCsrfToken->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#26 /home/metaqymo/public_html/vendor/flarum/core/src/Http/Middleware/ResolveRoute.php(69): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#27 /home/metaqymo/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ResolveRoute->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#28 /home/metaqymo/public_html/vendor/flarum/core/src/Http/Middleware/SetLocale.php(51): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#29 /home/metaqymo/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\SetLocale->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#30 /home/metaqymo/public_html/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(58): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#31 /home/metaqymo/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\AuthenticateWithHeader->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#32 /home/metaqymo/public_html/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(31): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#33 /home/metaqymo/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\AuthenticateWithSession->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#34 /home/metaqymo/public_html/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(52): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#35 /home/metaqymo/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\RememberFromCookie->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#36 /home/metaqymo/public_html/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#37 /home/metaqymo/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\StartSession->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#38 /home/metaqymo/public_html/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(29): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#39 /home/metaqymo/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Api\Middleware\FakeHttpMethods->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#40 /home/metaqymo/public_html/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#41 /home/metaqymo/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ParseJsonBody->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#42 /home/metaqymo/public_html/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#43 /home/metaqymo/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\HandleErrors->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#44 /home/metaqymo/public_html/vendor/flarum/core/src/Http/Middleware/InjectActorReference.php(25): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#45 /home/metaqymo/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\InjectActorReference->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#46 /home/metaqymo/public_html/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(75): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#47 /home/metaqymo/public_html/vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#48 /home/metaqymo/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\RequestHandler->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#49 /home/metaqymo/public_html/vendor/middlewares/base-path-router/src/BasePathRouter.php(99): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#50 /home/metaqymo/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\BasePathRouter->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#51 /home/metaqymo/public_html/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(36): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#52 /home/metaqymo/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Laminas\Stratigility\Middleware\OriginalMessages->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#53 /home/metaqymo/public_html/vendor/middlewares/base-path/src/BasePath.php(73): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#54 /home/metaqymo/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\BasePath->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#55 /home/metaqymo/public_html/vendor/flarum/core/src/Http/Middleware/ProcessIp.php(24): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#56 /home/metaqymo/public_html/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ProcessIp->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#57 /home/metaqymo/public_html/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(75): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#58 /home/metaqymo/public_html/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(64): Laminas\Stratigility\MiddlewarePipe->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\EmptyPipelineHandler))
#59 /home/metaqymo/public_html/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(73): Laminas\Stratigility\MiddlewarePipe->handle(Object(Laminas\Diactoros\ServerRequest))
#60 /home/metaqymo/public_html/vendor/flarum/core/src/Http/Server.php(45): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#61 /home/metaqymo/public_html/index.php(26): Flarum\Http\Server->listen()
#62 {main}
I tried deleting all 3 database values that contained “badge”, the first one wouldn’t let me delete unless I unchecked “enable foreign key checks” or something like that.
I cleared the cache and updated the database. The issue is still occurring. I have no idea what to do and I’m losing my mind. I hope I didn’t make things worse.
EDIT: The error has changed to this
Next Illuminate\Database\QueryException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'metaqymo_flarum.badges' doesn't exist (SQL: alter table `badges` drop foreign key `badge_category_id`) in /home/metaqymo/public_html/vendor/illuminate/database/Connection.php:712
EDIT 2: I just tried reinstalling it and my site has broken completely. Navigating to my domain displays
Warning: Undefined array key "data" in /home/metaqymo/public_html/vendor/flarum/core/src/Frontend/Content/CorePayload.php on line 57
Fatal error: Uncaught Laminas\HttpHandlerRunner\Exception\EmitterException: Unable to emit response; headers already sent in /home/metaqymo/public_html/vendor/flarum/core/src/Frontend/Content/CorePayload.php:57 in /home/metaqymo/public_html/vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php:15 Stack trace: #0 /home/metaqymo/public_html/vendor/laminas/laminas-httphandlerrunner/src/Emitter/SapiEmitterTrait.php(38): Laminas\HttpHandlerRunner\Exception\EmitterException::forHeadersSent('/home/metaqymo/...', 57) #1 /home/metaqymo/public_html/vendor/laminas/laminas-httphandlerrunner/src/Emitter/SapiEmitter.php(21): Laminas\HttpHandlerRunner\Emitter\SapiEmitter->assertNoPreviousOutput() #2 /home/metaqymo/public_html/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(75): Laminas\HttpHandlerRunner\Emitter\SapiEmitter->emit(Object(Laminas\Diactoros\Response\HtmlResponse)) #3 /home/metaqymo/public_html/vendor/flarum/core/src/Http/Server.php(45): Laminas\HttpHandlerRunner\RequestHandlerRunner->run() #4 /home/metaqymo/public_html/index.php(26): Flarum\Http\Server->listen() #5 {main} thrown in /home/metaqymo/public_html/vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php on line 15
Removing with composer fixed the site not working, but I’m still experiencing the problem originally mentioned in my post.
Weird thing about the errors, whatever action I took will display after refreshing. For example, if I like a post, it will appear as if the like didn’t go through, and show the oops error, but after refreshing, I can see the action went through.