Username Request by FriendsOfFlarum

License Latest Stable Version OpenCollective

Extiverse

A Flarum extension. Allows users to request new usernames which can be approved by moderators or admins.

Installation

Install manually with composer:

composer require fof/username-request:"*"

Updating

composer update fof/username-request

Links

An extension by FriendsOfFlarum.

    ram0ng1

    0.1.1

    • Fixed an issue when clicking username history when there is no username history (The button is now hidden when no changes have occurred) which caused the forum to become unresponsive.
    • Partially revamped the username history page
    • A few other smaller fixes

      ram0ng1 Can you provide more detail? How do you reproduce the issue, screenshots of errors, etc

        ram0ng1 I am unable to reproduce on my forum, can you open your browser console and check for js errors?

          Kyrne

          addProfilePage.js:19 Uncaught TypeError: Cannot read property 'length' of null
          at e.<anonymous> (addProfilePage.js:19)
          at e.t.<computed> [as navItems] (extend.js:27)
          at e.n.sidebarItems (UserPage.js:113)
          at e.n.view (UserPage.js:45)
          at e.addAlertToContent (addUpdateAlert.js:11)
          at e.t.<computed> [as view] (extend.js:61)
          at e.render (Component.js:102)
          at Object.o [as view] (Component.js:189)
          at mithril.js:1568
          at g (mithril.js:189)

            ram0ng1

            Try updating to 0.1.3 made a few changes which should fix it.

            Make sure to run php flarum migrate after updating.

              The first time I turn on an extension, an error 500 pops up.

              [2019-08-06 18:42:47] production.ERROR: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'json not null' at line 1 in /home/mykill/ftp/domains/www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:61
              Stack trace:
              #0 /home/mykill/ftp/domains/www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(61): PDO->prepare('alter table `us...', Array)
              #1 /home/mykill/ftp/domains/www/vendor/illuminate/database/Connection.php(452): Doctrine\DBAL\Driver\PDOConnection->prepare('alter table `us...')
              #2 /home/mykill/ftp/domains/www/vendor/illuminate/database/Connection.php(657): Illuminate\Database\Connection->Illuminate\Database\{closure}('alter table `us...', Array)
              #3 /home/mykill/ftp/domains/www/vendor/illuminate/database/Connection.php(624): Illuminate\Database\Connection->runQueryCallback('alter table `us...', Array, Object(Closure))
              #4 /home/mykill/ftp/domains/www/vendor/illuminate/database/Connection.php(459): Illuminate\Database\Connection->run('alter table `us...', Array, Object(Closure))
              #5 /home/mykill/ftp/domains/www/vendor/illuminate/database/Schema/Blueprint.php(97): Illuminate\Database\Connection->statement('alter table `us...')
              #6 /home/mykill/ftp/domains/www/vendor/illuminate/database/Schema/Builder.php(264): Illuminate\Database\Schema\Blueprint->build(Object(Illuminate\Database\MySqlConnection), Object(Illuminate\Database\Schema\Grammars\MySqlGrammar))
              #7 /home/mykill/ftp/domains/www/vendor/illuminate/database/Schema/Builder.php(149): Illuminate\Database\Schema\Builder->build(Object(Illuminate\Database\Schema\Blueprint))
              #8 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Database/Migration.php(69): Illuminate\Database\Schema\Builder->table('users', Object(Closure))
              #9 [internal function]: Flarum\Database\Migration::Flarum\Database\{closure}(Object(Illuminate\Database\Schema\MySqlBuilder))
              #10 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Database/Migrator.php(199): call_user_func(Object(Closure), Object(Illuminate\Database\Schema\MySqlBuilder))
              #11 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Database/Migrator.php(130): Flarum\Database\Migrator->runClosureMigration(Array)
              #12 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Database/Migrator.php(113): Flarum\Database\Migrator->runUp('/home/mykill/ft...', '2019_07_04_2120...', Object(Flarum\Extension\Extension))
              #13 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Database/Migrator.php(87): Flarum\Database\Migrator->runMigrationList('/home/mykill/ft...', Array, Object(Flarum\Extension\Extension))
              #14 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Extension/Extension.php(352): Flarum\Database\Migrator->run('/home/mykill/ft...', Object(Flarum\Extension\Extension))
              #15 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Extension/ExtensionManager.php(234): Flarum\Extension\Extension->migrate(Object(Flarum\Database\Migrator), 'up')
              #16 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Extension/ExtensionManager.php(127): Flarum\Extension\ExtensionManager->migrate(Object(Flarum\Extension\Extension))
              #17 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Api/Controller/UpdateExtensionController.php(49): Flarum\Extension\ExtensionManager->enable('fof-username-re...')
              #18 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/RouteHandlerFactory.php(40): Flarum\Api\Controller\UpdateExtensionController->handle(Object(Zend\Diactoros\ServerRequest))
              #19 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/DispatchRoute.php(67): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}(Object(Zend\Diactoros\ServerRequest), Array)
              #20 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\DispatchRoute->process(Object(Zend\Diactoros\ServerRequest), Object(Closure))
              #21 /home/mykill/ftp/domains/www/vendor/reflar/pwned-passwords/src/Middleware/CheckPassword.php(66): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #22 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Reflar\PwnedPasswords\Middleware\CheckPassword->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #23 /home/mykill/ftp/domains/www/vendor/reflar/stopforumspam/src/Middleware/RegisterMiddleware.php(75): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #24 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Reflar\Stopforumspam\middleware\RegisterMiddleware->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #25 /home/mykill/ftp/domains/www/vendor/fof/secure-https/src/Middlewares/ContentSecurityPolicyMiddleware.php(21): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #26 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): FoF\SecureHttps\Middlewares\ContentSecurityPolicyMiddleware->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #27 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/SetLocale.php(51): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #28 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\SetLocale->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #29 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(33): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #30 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\CheckCsrfToken->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #31 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(56): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #32 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\AuthenticateWithHeader->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #33 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(34): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #34 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\AuthenticateWithSession->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #35 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(52): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #36 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\RememberFromCookie->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #37 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/StartSession.php(62): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #38 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\StartSession->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #39 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(31): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #40 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Api\Middleware\FakeHttpMethods->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #41 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(29): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #42 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\ParseJsonBody->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #43 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Api/Middleware/HandleErrors.php(42): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #44 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Api\Middleware\HandleErrors->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #45 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(83): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #46 /home/mykill/ftp/domains/www/vendor/middlewares/request-handler/src/RequestHandler.php(84): Zend\Stratigility\MiddlewarePipe->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #47 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\RequestHandler->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #48 /home/mykill/ftp/domains/www/vendor/middlewares/base-path-router/src/BasePathRouter.php(97): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #49 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\BasePathRouter->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #50 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Middleware/OriginalMessages.php(41): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #51 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Zend\Stratigility\Middleware\OriginalMessages->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #52 /home/mykill/ftp/domains/www/vendor/middlewares/base-path/src/BasePath.php(53): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #53 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\BasePath->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #54 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(83): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #55 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(72): Zend\Stratigility\MiddlewarePipe->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\EmptyPipelineHandler))
              #56 /home/mykill/ftp/domains/www/vendor/zendframework/zend-httphandlerrunner/src/RequestHandlerRunner.php(95): Zend\Stratigility\MiddlewarePipe->handle(Object(Zend\Diactoros\ServerRequest))
              #57 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Server.php(46): Zend\HttpHandlerRunner\RequestHandlerRunner->run()
              #58 /home/mykill/ftp/domains/www/public/index.php(22): Flarum\Http\Server->listen()
              #59 {main}
              
              Next Doctrine\DBAL\Driver\PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'json not null' at line 1 in /home/mykill/ftp/domains/www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:63
              Stack trace:
              #0 /home/mykill/ftp/domains/www/vendor/illuminate/database/Connection.php(452): Doctrine\DBAL\Driver\PDOConnection->prepare('alter table `us...')
              #1 /home/mykill/ftp/domains/www/vendor/illuminate/database/Connection.php(657): Illuminate\Database\Connection->Illuminate\Database\{closure}('alter table `us...', Array)
              #2 /home/mykill/ftp/domains/www/vendor/illuminate/database/Connection.php(624): Illuminate\Database\Connection->runQueryCallback('alter table `us...', Array, Object(Closure))
              #3 /home/mykill/ftp/domains/www/vendor/illuminate/database/Connection.php(459): Illuminate\Database\Connection->run('alter table `us...', Array, Object(Closure))
              #4 /home/mykill/ftp/domains/www/vendor/illuminate/database/Schema/Blueprint.php(97): Illuminate\Database\Connection->statement('alter table `us...')
              #5 /home/mykill/ftp/domains/www/vendor/illuminate/database/Schema/Builder.php(264): Illuminate\Database\Schema\Blueprint->build(Object(Illuminate\Database\MySqlConnection), Object(Illuminate\Database\Schema\Grammars\MySqlGrammar))
              #6 /home/mykill/ftp/domains/www/vendor/illuminate/database/Schema/Builder.php(149): Illuminate\Database\Schema\Builder->build(Object(Illuminate\Database\Schema\Blueprint))
              #7 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Database/Migration.php(69): Illuminate\Database\Schema\Builder->table('users', Object(Closure))
              #8 [internal function]: Flarum\Database\Migration::Flarum\Database\{closure}(Object(Illuminate\Database\Schema\MySqlBuilder))
              #9 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Database/Migrator.php(199): call_user_func(Object(Closure), Object(Illuminate\Database\Schema\MySqlBuilder))
              #10 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Database/Migrator.php(130): Flarum\Database\Migrator->runClosureMigration(Array)
              #11 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Database/Migrator.php(113): Flarum\Database\Migrator->runUp('/home/mykill/ft...', '2019_07_04_2120...', Object(Flarum\Extension\Extension))
              #12 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Database/Migrator.php(87): Flarum\Database\Migrator->runMigrationList('/home/mykill/ft...', Array, Object(Flarum\Extension\Extension))
              #13 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Extension/Extension.php(352): Flarum\Database\Migrator->run('/home/mykill/ft...', Object(Flarum\Extension\Extension))
              #14 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Extension/ExtensionManager.php(234): Flarum\Extension\Extension->migrate(Object(Flarum\Database\Migrator), 'up')
              #15 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Extension/ExtensionManager.php(127): Flarum\Extension\ExtensionManager->migrate(Object(Flarum\Extension\Extension))
              #16 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Api/Controller/UpdateExtensionController.php(49): Flarum\Extension\ExtensionManager->enable('fof-username-re...')
              #17 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/RouteHandlerFactory.php(40): Flarum\Api\Controller\UpdateExtensionController->handle(Object(Zend\Diactoros\ServerRequest))
              #18 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/DispatchRoute.php(67): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}(Object(Zend\Diactoros\ServerRequest), Array)
              #19 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\DispatchRoute->process(Object(Zend\Diactoros\ServerRequest), Object(Closure))
              #20 /home/mykill/ftp/domains/www/vendor/reflar/pwned-passwords/src/Middleware/CheckPassword.php(66): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #21 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Reflar\PwnedPasswords\Middleware\CheckPassword->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #22 /home/mykill/ftp/domains/www/vendor/reflar/stopforumspam/src/Middleware/RegisterMiddleware.php(75): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #23 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Reflar\Stopforumspam\middleware\RegisterMiddleware->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #24 /home/mykill/ftp/domains/www/vendor/fof/secure-https/src/Middlewares/ContentSecurityPolicyMiddleware.php(21): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #25 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): FoF\SecureHttps\Middlewares\ContentSecurityPolicyMiddleware->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #26 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/SetLocale.php(51): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #27 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\SetLocale->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #28 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(33): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #29 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\CheckCsrfToken->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #30 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(56): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #31 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\AuthenticateWithHeader->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #32 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(34): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #33 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\AuthenticateWithSession->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #34 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(52): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #35 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\RememberFromCookie->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #36 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/StartSession.php(62): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #37 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\StartSession->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #38 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(31): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #39 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Api\Middleware\FakeHttpMethods->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #40 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(29): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #41 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\ParseJsonBody->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #42 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Api/Middleware/HandleErrors.php(42): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #43 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Api\Middleware\HandleErrors->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #44 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(83): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #45 /home/mykill/ftp/domains/www/vendor/middlewares/request-handler/src/RequestHandler.php(84): Zend\Stratigility\MiddlewarePipe->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #46 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\RequestHandler->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #47 /home/mykill/ftp/domains/www/vendor/middlewares/base-path-router/src/BasePathRouter.php(97): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #48 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\BasePathRouter->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #49 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Middleware/OriginalMessages.php(41): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #50 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Zend\Stratigility\Middleware\OriginalMessages->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #51 /home/mykill/ftp/domains/www/vendor/middlewares/base-path/src/BasePath.php(53): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #52 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\BasePath->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #53 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(83): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #54 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(72): Zend\Stratigility\MiddlewarePipe->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\EmptyPipelineHandler))
              #55 /home/mykill/ftp/domains/www/vendor/zendframework/zend-httphandlerrunner/src/RequestHandlerRunner.php(95): Zend\Stratigility\MiddlewarePipe->handle(Object(Zend\Diactoros\ServerRequest))
              #56 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Server.php(46): Zend\HttpHandlerRunner\RequestHandlerRunner->run()
              #57 /home/mykill/ftp/domains/www/public/index.php(22): Flarum\Http\Server->listen()
              #58 {main}
              
              Next Illuminate\Database\QueryException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'json not null' at line 1 (SQL: alter table `users` add `username_history` json not null) in /home/mykill/ftp/domains/www/vendor/illuminate/database/Connection.php:664
              Stack trace:
              #0 /home/mykill/ftp/domains/www/vendor/illuminate/database/Connection.php(624): Illuminate\Database\Connection->runQueryCallback('alter table `us...', Array, Object(Closure))
              #1 /home/mykill/ftp/domains/www/vendor/illuminate/database/Connection.php(459): Illuminate\Database\Connection->run('alter table `us...', Array, Object(Closure))
              #2 /home/mykill/ftp/domains/www/vendor/illuminate/database/Schema/Blueprint.php(97): Illuminate\Database\Connection->statement('alter table `us...')
              #3 /home/mykill/ftp/domains/www/vendor/illuminate/database/Schema/Builder.php(264): Illuminate\Database\Schema\Blueprint->build(Object(Illuminate\Database\MySqlConnection), Object(Illuminate\Database\Schema\Grammars\MySqlGrammar))
              #4 /home/mykill/ftp/domains/www/vendor/illuminate/database/Schema/Builder.php(149): Illuminate\Database\Schema\Builder->build(Object(Illuminate\Database\Schema\Blueprint))
              #5 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Database/Migration.php(69): Illuminate\Database\Schema\Builder->table('users', Object(Closure))
              #6 [internal function]: Flarum\Database\Migration::Flarum\Database\{closure}(Object(Illuminate\Database\Schema\MySqlBuilder))
              #7 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Database/Migrator.php(199): call_user_func(Object(Closure), Object(Illuminate\Database\Schema\MySqlBuilder))
              #8 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Database/Migrator.php(130): Flarum\Database\Migrator->runClosureMigration(Array)
              #9 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Database/Migrator.php(113): Flarum\Database\Migrator->runUp('/home/mykill/ft...', '2019_07_04_2120...', Object(Flarum\Extension\Extension))
              #10 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Database/Migrator.php(87): Flarum\Database\Migrator->runMigrationList('/home/mykill/ft...', Array, Object(Flarum\Extension\Extension))
              #11 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Extension/Extension.php(352): Flarum\Database\Migrator->run('/home/mykill/ft...', Object(Flarum\Extension\Extension))
              #12 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Extension/ExtensionManager.php(234): Flarum\Extension\Extension->migrate(Object(Flarum\Database\Migrator), 'up')
              #13 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Extension/ExtensionManager.php(127): Flarum\Extension\ExtensionManager->migrate(Object(Flarum\Extension\Extension))
              #14 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Api/Controller/UpdateExtensionController.php(49): Flarum\Extension\ExtensionManager->enable('fof-username-re...')
              #15 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/RouteHandlerFactory.php(40): Flarum\Api\Controller\UpdateExtensionController->handle(Object(Zend\Diactoros\ServerRequest))
              #16 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/DispatchRoute.php(67): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}(Object(Zend\Diactoros\ServerRequest), Array)
              #17 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\DispatchRoute->process(Object(Zend\Diactoros\ServerRequest), Object(Closure))
              #18 /home/mykill/ftp/domains/www/vendor/reflar/pwned-passwords/src/Middleware/CheckPassword.php(66): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #19 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Reflar\PwnedPasswords\Middleware\CheckPassword->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #20 /home/mykill/ftp/domains/www/vendor/reflar/stopforumspam/src/Middleware/RegisterMiddleware.php(75): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #21 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Reflar\Stopforumspam\middleware\RegisterMiddleware->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #22 /home/mykill/ftp/domains/www/vendor/fof/secure-https/src/Middlewares/ContentSecurityPolicyMiddleware.php(21): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #23 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): FoF\SecureHttps\Middlewares\ContentSecurityPolicyMiddleware->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #24 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/SetLocale.php(51): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #25 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\SetLocale->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #26 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(33): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #27 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\CheckCsrfToken->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #28 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(56): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #29 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\AuthenticateWithHeader->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #30 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(34): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #31 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\AuthenticateWithSession->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #32 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(52): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #33 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\RememberFromCookie->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #34 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/StartSession.php(62): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #35 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\StartSession->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #36 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(31): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #37 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Api\Middleware\FakeHttpMethods->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #38 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(29): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #39 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Http\Middleware\ParseJsonBody->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #40 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Api/Middleware/HandleErrors.php(42): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #41 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Flarum\Api\Middleware\HandleErrors->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #42 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(83): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #43 /home/mykill/ftp/domains/www/vendor/middlewares/request-handler/src/RequestHandler.php(84): Zend\Stratigility\MiddlewarePipe->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #44 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\RequestHandler->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #45 /home/mykill/ftp/domains/www/vendor/middlewares/base-path-router/src/BasePathRouter.php(97): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #46 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\BasePathRouter->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #47 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Middleware/OriginalMessages.php(41): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #48 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Zend\Stratigility\Middleware\OriginalMessages->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #49 /home/mykill/ftp/domains/www/vendor/middlewares/base-path/src/BasePath.php(53): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #50 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/Next.php(60): Middlewares\BasePath->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\Next))
              #51 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(83): Zend\Stratigility\Next->handle(Object(Zend\Diactoros\ServerRequest))
              #52 /home/mykill/ftp/domains/www/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php(72): Zend\Stratigility\MiddlewarePipe->process(Object(Zend\Diactoros\ServerRequest), Object(Zend\Stratigility\EmptyPipelineHandler))
              #53 /home/mykill/ftp/domains/www/vendor/zendframework/zend-httphandlerrunner/src/RequestHandlerRunner.php(95): Zend\Stratigility\MiddlewarePipe->handle(Object(Zend\Diactoros\ServerRequest))
              #54 /home/mykill/ftp/domains/www/vendor/flarum/core/src/Http/Server.php(46): Zend\HttpHandlerRunner\RequestHandlerRunner->run()
              #55 /home/mykill/ftp/domains/www/public/index.php(22): Flarum\Http\Server->listen()
              #56 {main}  

                Artuu Looks like an issue with an old MySQL / MariaDB installation, same as your other post.

                Works like a charm!
                Thanks! You're awesome guys! 😃

                5 days later

                @Kyrne When installing on my vps server the following error appears while trying to enable the extension:

                {"errors":[{"status":"405","code":"method_not_allowed"}]}

                PHP 7.1.31-1 ubuntu: 16.04.1
                MySQL: 10.0.38-MariaDB

                Edit: also to the extension FriendsOfFlarum Ban IPs

                  • [deleted]

                  ram0ng1 I think that an upgrade to mariadb resolves this. I had a similar issue and upgraded.

                    • [deleted]

                    ram0ng1 I upgraded via SSH to mariadb. This will vary on who your VPS is hosted with, but they should have a guide on how to do this.