FriendsOfFlarum / polls

A Flarum extension that adds polls to your discussions
https://discuss.flarum.org/d/20586
MIT License
23 stars 12 forks source link

Unable to enable extension #68

Closed Yang-qwq closed 1 year ago

Yang-qwq commented 1 year ago

Bug Report

Current Behavior Unable to enable extension

Steps to Reproduce

  1. Install the extension normally
  2. Go to admin dashboard, then enable it
  3. Error was happened

Expected Behavior The extension can work well

Screenshots null

Environment

Flarum core: 1.7.2
PHP version: 7.4.3-4ubuntu2.17
MySQL version: 10.11.2-MariaDB
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, pcntl, Reflection, SPL, session, standard, sodium, gmp, mysqlnd, PDO, xml, bcmath, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, igbinary, imagick, json, exif, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache
+--------------------------------------+-------------+--------+
| Flarum Extensions                    |             |        |
+--------------------------------------+-------------+--------+
| ID                                   | Version     | Commit |
+--------------------------------------+-------------+--------+
| flarum-flags                         | v1.7.0      |        |
| flarum-approval                      | v1.7.0      |        |
| flarum-likes                         | v1.7.0      |        |
| flarum-subscriptions                 | v1.7.0      |        |
| flarum-tags                          | v1.7.1      |        |
| clarkwinkelmann-likes-received       | 1.0.2       |        |
| fof-follow-tags                      | 1.1.7       |        |
| yannisme-oxotheme                    | 2.1.5       |        |
| justoverclock-user-statistics        | 0.1.9       |        |
| imshuzai-aplayer-metingjs-for-flarum | 1.1.5       |        |
| ianm-no-meta-title                   | 1.1.0       |        |
| ianm-follow-users                    | 1.3.0       |        |
| fof-nightmode                        | 1.5.1       |        |
| flarum-suspend                       | v1.7.0      |        |
| flarum-sticky                        | v1.7.0      |        |
| flarum-statistics                    | v1.7.0      |        |
| flarum-mentions                      | v1.7.0      |        |
| flarum-markdown                      | v1.7.0      |        |
| flarum-lock                          | v1.7.0      |        |
| flarum-lang-english                  | v1.7.0      |        |
| flarum-lang-chinese-traditional      | v1.9.3      |        |
| flarum-lang-chinese-simplified       | v1.1.1.1220 |        |
| flarum-bbcode                        | v1.7.0      |        |
| datlechin-usercard-uid               | v0.1.1      |        |
| askvortsov-pwa                       | v3.2.1      |        |
+--------------------------------------+-------------+--------+
Base URL: https://board.yang-qwq.ml
Installation path: /var/www/flarum
Queue driver: sync
Session driver: file
Mail driver: smtp
Debug mode: off

Possible solution(s)

Additional Context Here is flarum logs below when wrong happened:

root@localhost:/var/www/flarum# tail -f -n 0 storage/logs/flarum-2023-04-18.log
[2023-04-18 11:07:16] flarum.ERROR: Error: Class 'FoF\Polls\Migrations\AbstractMigration' not found in /var/www/flarum/vendor/fof/polls/migrations/2019_07_01_000000_add_polls_table.php:17
Stack trace:
#0 /var/www/flarum/vendor/illuminate/filesystem/Filesystem.php(107): require()
#1 /var/www/flarum/vendor/illuminate/filesystem/Filesystem.php(108): Illuminate\Filesystem\Filesystem::Illuminate\Filesystem\{closure}()
#2 /var/www/flarum/vendor/flarum/core/src/Database/Migrator.php(257): Illuminate\Filesystem\Filesystem->getRequire()
#3 /var/www/flarum/vendor/flarum/core/src/Database/Migrator.php(210): Flarum\Database\Migrator->resolve()
#4 /var/www/flarum/vendor/flarum/core/src/Database/Migrator.php(127): Flarum\Database\Migrator->resolveAndRunClosureMigration()
#5 /var/www/flarum/vendor/flarum/core/src/Database/Migrator.php(113): Flarum\Database\Migrator->runUp()
#6 /var/www/flarum/vendor/flarum/core/src/Database/Migrator.php(87): Flarum\Database\Migrator->runMigrationList()
#7 /var/www/flarum/vendor/flarum/core/src/Extension/Extension.php(499): Flarum\Database\Migrator->run()
#8 /var/www/flarum/vendor/flarum/core/src/Extension/ExtensionManager.php(329): Flarum\Extension\Extension->migrate()
#9 /var/www/flarum/vendor/flarum/core/src/Extension/ExtensionManager.php(200): Flarum\Extension\ExtensionManager->migrate()
#10 /var/www/flarum/vendor/flarum/core/src/Extension/Command/ToggleExtensionHandler.php(36): Flarum\Extension\ExtensionManager->enable()
#11 /var/www/flarum/vendor/illuminate/bus/Dispatcher.php(122): Flarum\Extension\Command\ToggleExtensionHandler->handle()
#12 /var/www/flarum/vendor/illuminate/pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}()
#13 /var/www/flarum/vendor/illuminate/pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#14 /var/www/flarum/vendor/illuminate/bus/Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then()
#15 /var/www/flarum/vendor/illuminate/bus/Dispatcher.php(78): Illuminate\Bus\Dispatcher->dispatchNow()
#16 /var/www/flarum/vendor/flarum/core/src/Api/Controller/UpdateExtensionController.php(43): Illuminate\Bus\Dispatcher->dispatch()
#17 /var/www/flarum/vendor/flarum/core/src/Http/RouteHandlerFactory.php(41): Flarum\Api\Controller\UpdateExtensionController->handle()
#18 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php(27): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}()
#19 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ExecuteRoute->process()
#20 /var/www/flarum/vendor/flarum/core/src/Api/Middleware/ThrottleApi.php(33): Laminas\Stratigility\Next->handle()
#21 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Api\Middleware\ThrottleApi->process()
#22 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(44): Laminas\Stratigility\Next->handle()
#23 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\CheckCsrfToken->process()
#24 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/ResolveRoute.php(69): Laminas\Stratigility\Next->handle()
#25 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ResolveRoute->process()
#26 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/SetLocale.php(51): Laminas\Stratigility\Next->handle()
#27 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\SetLocale->process()
#28 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(58): Laminas\Stratigility\Next->handle()
#29 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\AuthenticateWithHeader->process()
#30 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(31): Laminas\Stratigility\Next->handle()
#31 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\AuthenticateWithSession->process()
#32 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(52): Laminas\Stratigility\Next->handle()
#33 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\RememberFromCookie->process()
#34 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Laminas\Stratigility\Next->handle()
#35 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\StartSession->process()
#36 /var/www/flarum/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(29): Laminas\Stratigility\Next->handle()
#37 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Api\Middleware\FakeHttpMethods->process()
#38 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Laminas\Stratigility\Next->handle()
#39 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ParseJsonBody->process()
#40 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle()
#41 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\HandleErrors->process()
#42 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/InjectActorReference.php(25): Laminas\Stratigility\Next->handle()
#43 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\InjectActorReference->process()
#44 /var/www/flarum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(75): Laminas\Stratigility\Next->handle()
#45 /var/www/flarum/vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process()
#46 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\RequestHandler->process()
#47 /var/www/flarum/vendor/middlewares/base-path-router/src/BasePathRouter.php(101): Laminas\Stratigility\Next->handle()
#48 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\BasePathRouter->process()
#49 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(36): Laminas\Stratigility\Next->handle()
#50 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Laminas\Stratigility\Middleware\OriginalMessages->process()
#51 /var/www/flarum/vendor/middlewares/base-path/src/BasePath.php(73): Laminas\Stratigility\Next->handle()
#52 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\BasePath->process()
#53 /var/www/flarum/vendor/flarum/core/src/Http/Middleware/ProcessIp.php(24): Laminas\Stratigility\Next->handle()
#54 /var/www/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ProcessIp->process()
#55 /var/www/flarum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(75): Laminas\Stratigility\Next->handle()
#56 /var/www/flarum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(64): Laminas\Stratigility\MiddlewarePipe->process()
#57 /var/www/flarum/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(96): Laminas\Stratigility\MiddlewarePipe->handle()
#58 /var/www/flarum/vendor/flarum/core/src/Http/Server.php(45): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#59 /var/www/flarum/public/index.php(26): Flarum\Http\Server->listen()
#60 {main}

apache error.log:

[Mon Apr 17 19:27:59.358803 2023] [php7:notice] [pid 14323] [client 127.0.0.1:46902] PHP Notice:  Trying to access array offset on value of type null in /var/www/flarum/storage/views/647ddc1127ec5096c3d335dce95d300a0377fc6e.php on line 11, referer: https://board.yang-qwq.ml/admin
[Mon Apr 17 19:27:59.358998 2023] [php7:notice] [pid 14323] [client 127.0.0.1:46902] PHP Notice:  Trying to access array offset on value of type null in /var/www/flarum/storage/views/647ddc1127ec5096c3d335dce95d300a0377fc6e.php on line 12, referer: https://board.yang-qwq.ml/admin
[Mon Apr 17 19:27:59.359024 2023] [php7:notice] [pid 14323] [client 127.0.0.1:46902] PHP Notice:  Trying to access array offset on value of type null in /var/www/flarum/storage/views/647ddc1127ec5096c3d335dce95d300a0377fc6e.php on line 15, referer: https://board.yang-qwq.ml/admin

and api response:

{"errors":[{"status":"500","code":"unknown"}]}
Yang-qwq commented 1 year ago

PS: this problem are also happened similar when I'm trying install other extensions

Yang-qwq commented 1 year ago

Now the problem maybe fixed: https://discuss.flarum.org/d/32787-unable-to-enable-extension/2