@FriendsOfFlarum @SychO Version 1.4.5 has a bug. Call to a member function getKey() on null
. The error is in Line 34 of the new file src/Extenders/LoadFilesRelationship.php
. Version 1.4.4 war working for me.
[2023-11-12 15:44:13] flarum.ERROR: Error: Call to a member function getKey() on null in /var/www/example.com/flarum/vendor/illuminate/database/Eloquent/Collection.php:321
Stack trace:
#0 [internal function]: Illuminate\Database\Eloquent\Collection->Illuminate\Database\Eloquent\{closure}()
#1 /var/www/example.com/flarum/vendor/illuminate/database/Eloquent/Collection.php(322): array_map()
#2 /var/www/example.com/flarum/vendor/illuminate/database/Eloquent/Collection.php(81): Illuminate\Database\Eloquent\Collection->modelKeys()
#3 /var/www/example.com/flarum/vendor/flarum/core/src/Database/Eloquent/Collection.php(47): Illuminate\Database\Eloquent\Collection->loadAggregate()
#4 /var/www/example.com/flarum/vendor/flarum/core/src/Database/AbstractModel.php(252): Flarum\Database\Eloquent\Collection->Flarum\Database\Eloquent\{closure}()
#5 /var/www/example.com/flarum/vendor/flarum/core/src/Database/Eloquent/Collection.php(48): Flarum\Database\AbstractModel->withTableAlias()
#6 /var/www/example.com/flarum/vendor/illuminate/database/Eloquent/Collection.php(111): Flarum\Database\Eloquent\Collection->loadAggregate()
#7 /var/www/example.com/flarum/vendor/fof/upload/src/Extenders/LoadFilesRelationship.php(34): Illuminate\Database\Eloquent\Collection->loadCount()
#8 /var/www/example.com/flarum/vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php(121): FoF\Upload\Extenders\LoadFilesRelationship::countRelations()
#9 /var/www/example.com/flarum/vendor/flarum/core/src/Http/RouteHandlerFactory.php(41): Flarum\Api\Controller\AbstractSerializeController->handle()
#10 /var/www/example.com/flarum/vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php(27): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}()
#11 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ExecuteRoute->process()
#12 /var/www/example.com/flarum/vendor/flarum/core/src/Api/Middleware/ThrottleApi.php(33): Laminas\Stratigility\Next->handle()
#13 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Api\Middleware\ThrottleApi->process()
#14 /var/www/example.com/flarum/vendor/flarum/core/src/Http/Middleware/ResolveRoute.php(69): Laminas\Stratigility\Next->handle()
#15 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ResolveRoute->process()
#16 /var/www/example.com/flarum/vendor/flarum/core/src/Http/Middleware/SetLocale.php(51): Laminas\Stratigility\Next->handle()
#17 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\SetLocale->process()
#18 /var/www/example.com/flarum/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle()
#19 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\HandleErrors->process()
#20 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(75): Laminas\Stratigility\Next->handle()
#21 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(64): Laminas\Stratigility\MiddlewarePipe->process()
#22 /var/www/example.com/flarum/vendor/flarum/core/src/Api/Client.php(141): Laminas\Stratigility\MiddlewarePipe->handle()
#23 /var/www/example.com/flarum/vendor/flarum/core/src/Api/Client.php(91): Flarum\Api\Client->send()
#24 /var/www/example.com/flarum/vendor/flarum/core/src/Forum/Content/Index.php(108): Flarum\Api\Client->get()
#25 /var/www/example.com/flarum/vendor/flarum/core/src/Forum/Content/Index.php(85): Flarum\Forum\Content\Index->getApiDocument()
#26 /var/www/example.com/flarum/vendor/flarum/core/src/Frontend/Frontend.php(62): Flarum\Forum\Content\Index->__invoke()
#27 /var/www/example.com/flarum/vendor/flarum/core/src/Frontend/Frontend.php(54): Flarum\Frontend\Frontend->populate()
#28 /var/www/example.com/flarum/vendor/flarum/core/src/Frontend/Controller.php(32): Flarum\Frontend\Frontend->document()
#29 /var/www/example.com/flarum/vendor/flarum/core/src/Http/RouteHandlerFactory.php(41): Flarum\Frontend\Controller->handle()
#30 /var/www/example.com/flarum/vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php(27): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}()
#31 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ExecuteRoute->process()
#32 /var/www/example.com/flarum/vendor/fof/terms/src/Middlewares/RegisterMiddleware.php(59): Laminas\Stratigility\Next->handle()
#33 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): FoF\Terms\Middlewares\RegisterMiddleware->process()
#34 /var/www/example.com/flarum/vendor/flarum/core/src/Http/Middleware/ContentTypeOptionsHeader.php(21): Laminas\Stratigility\Next->handle()
#35 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ContentTypeOptionsHeader->process()
#36 /var/www/example.com/flarum/vendor/flarum/core/src/Http/Middleware/ReferrerPolicyHeader.php(30): Laminas\Stratigility\Next->handle()
#37 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ReferrerPolicyHeader->process()
#38 /var/www/example.com/flarum/vendor/flarum/core/src/Http/Middleware/FlarumPromotionHeader.php(30): Laminas\Stratigility\Next->handle()
#39 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\FlarumPromotionHeader->process()
#40 /var/www/example.com/flarum/vendor/flarum/core/src/Http/Middleware/ShareErrorsFromSession.php(57): Laminas\Stratigility\Next->handle()
#41 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ShareErrorsFromSession->process()
#42 /var/www/example.com/flarum/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(36): Laminas\Stratigility\Next->handle()
#43 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\CheckCsrfToken->process()
#44 /var/www/example.com/flarum/vendor/flarum/core/src/Http/Middleware/ResolveRoute.php(69): Laminas\Stratigility\Next->handle()
#45 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ResolveRoute->process()
#46 /var/www/example.com/flarum/vendor/flarum/core/src/Http/Middleware/SetLocale.php(51): Laminas\Stratigility\Next->handle()
#47 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\SetLocale->process()
#48 /var/www/example.com/flarum/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(31): Laminas\Stratigility\Next->handle()
#49 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\AuthenticateWithSession->process()
#50 /var/www/example.com/flarum/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(52): Laminas\Stratigility\Next->handle()
#51 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\RememberFromCookie->process()
#52 /var/www/example.com/flarum/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Laminas\Stratigility\Next->handle()
#53 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\StartSession->process()
#54 /var/www/example.com/flarum/vendor/flarum/core/src/Http/Middleware/CollectGarbage.php(46): Laminas\Stratigility\Next->handle()
#55 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\CollectGarbage->process()
#56 /var/www/example.com/flarum/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Laminas\Stratigility\Next->handle()
#57 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ParseJsonBody->process()
#58 /var/www/example.com/flarum/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle()
#59 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\HandleErrors->process()
#60 /var/www/example.com/flarum/vendor/flarum/core/src/Http/Middleware/InjectActorReference.php(25): Laminas\Stratigility\Next->handle()
#61 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\InjectActorReference->process()
#62 /var/www/example.com/flarum/vendor/fof/merge-discussions/src/Middleware/Redirection.php(28): Laminas\Stratigility\Next->handle()
#63 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): FoF\MergeDiscussions\Middleware\Redirection->process()
#64 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(75): Laminas\Stratigility\Next->handle()
#65 /var/www/example.com/flarum/vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process()
#66 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\RequestHandler->process()
#67 /var/www/example.com/flarum/vendor/middlewares/base-path-router/src/BasePathRouter.php(101): Laminas\Stratigility\Next->handle()
#68 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\BasePathRouter->process()
#69 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(36): Laminas\Stratigility\Next->handle()
#70 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Laminas\Stratigility\Middleware\OriginalMessages->process()
#71 /var/www/example.com/flarum/vendor/middlewares/base-path/src/BasePath.php(73): Laminas\Stratigility\Next->handle()
#72 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\BasePath->process()
#73 /var/www/example.com/flarum/vendor/flarum/core/src/Http/Middleware/ProcessIp.php(24): Laminas\Stratigility\Next->handle()
#74 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ProcessIp->process()
#75 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(75): Laminas\Stratigility\Next->handle()
#76 /var/www/example.com/flarum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(64): Laminas\Stratigility\MiddlewarePipe->process()
#77 /var/www/example.com/flarum/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(73): Laminas\Stratigility\MiddlewarePipe->handle()
#78 /var/www/example.com/flarum/vendor/flarum/core/src/Http/Server.php(45): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#79 /var/www/example.com/flarum/public/index.php(26): Flarum\Http\Server->listen()
Flarum Info:
Flarum core: 1.8.3
PHP version: 8.1.2-1ubuntu2.14
MySQL version: 8.0.35-0ubuntu0.22.04.1
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, Reflection, SPL, session, standard, sodium, mysqlnd, PDO, xml, bz2, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, imagick, intl, exif, mysqli, pdo_mysql, Phar, posix, readline, shmo p, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache
+--------------------------------------+------------+------------------------------------------+
| Flarum Extensions | | |
+--------------------------------------+------------+------------------------------------------+
| ID | Version | Commit |
+--------------------------------------+------------+------------------------------------------+
| flarum-flags | v1.8.0 | |
| flarum-bbcode | v1.8.0 | |
| flarum-suspend | v1.8.1 | |
| flarum-approval | v1.8.0 | |
| flarum-tags | v1.8.0 | |
| fof-formatting | 1.0.3 | |
| wolfgang-demeter-bbcode-5star-rating | dev-main | 57722d46957880ba45cce5a1e628ef51bb9237ab |
| wolfgang-demeter-amazon-product-api | dev-main | 103a697272450f99fe2fb223aaec2c668e72730b |
| fof-user-bio | 1.3.0 | |
| fof-upload | 1.4.5 | |
| fof-terms | 1.3.0 | |
| fof-split | 1.1.1 | |
| fof-socialprofile | 1.1.6 | |
| fof-recaptcha | 1.3.0 | |
| fof-pages | 1.0.8 | |
| fof-merge-discussions | 1.4.1 | |
| fof-links | 1.2.0 | |
| fof-byobu | 1.3.4 | |
| fof-amazon-affiliation | 1.1.0 | |
| flarum-subscriptions | v1.8.0 | |
| flarum-sticky | v1.8.0 | |
| flarum-statistics | v1.8.0 | |
| flarum-nicknames | v1.8.0 | |
| flarum-mentions | v1.8.2 | |
| flarum-markdown | v1.8.0 | |
| flarum-lock | v1.8.0 | |
| flarum-likes | v1.8.0 | |
| flarum-lang-german | dev-master | |
| flarum-lang-english | v1.8.0 | |
| datlechin-birthdays | v2.0.1 | |
| askvortsov-auto-moderator | v0.1.3 | |
| antoinefr-bbcode-fa | v1.0.0 | |
+--------------------------------------+------------+------------------------------------------+
Base URL: https://dev.example.com
Installation path: /var/www/example.com/flarum
Queue driver: sync
Session driver: file
Mail driver: smtp
Debug mode: ON