FriendsOfFlarum / upload

The file upload extension with insane intelligence for your Flarum forum.
https://discuss.flarum.org/d/4154
MIT License
177 stars 96 forks source link

Error when trying to attach a file (BadMethodCallException: Call to undefined method FoF\Upload\File::byUuid()) #404

Closed playaz44 closed 2 months ago

playaz44 commented 3 months ago

Hello, after a long time I returned to playing with this extension. I updated it to the latest version and when I try to upload any file I get this error. Can someone take a look at this?

Storage is configured to use s3, about half a year ago (I don't remember the exact extension version) everything worked fine. Nothing has changed except that I updated the flarum and all plugins.

[2024-08-07 18:54:29] flarum.ERROR: BadMethodCallException: Call to undefined method FoF\Upload\File::byUuid() in /var/www/panel/vendor/illuminate/support/Traits/ForwardsCalls.php:71
Stack trace:
#0 /var/www/panel/vendor/illuminate/support/Traits/ForwardsCalls.php(36): Illuminate\Database\Eloquent\Model::throwBadMethodCallException()
#1 /var/www/panel/vendor/illuminate/database/Eloquent/Model.php(2132): Illuminate\Database\Eloquent\Model->forwardCallTo()
#2 /var/www/panel/vendor/flarum/core/src/Database/AbstractModel.php(224): Illuminate\Database\Eloquent\Model->__call()
#3 /var/www/panel/vendor/illuminate/database/Eloquent/Model.php(2144): Flarum\Database\AbstractModel->__call()
#4 /var/www/panel/vendor/fof/upload/src/Repositories/FileRepository.php(69): Illuminate\Database\Eloquent\Model::__callStatic()
#5 /var/www/panel/vendor/fof/upload/src/Repositories/FileRepository.php(83): FoF\Upload\Repositories\FileRepository->findByUuid()
#6 /var/www/panel/vendor/fof/upload/src/Commands/UploadHandler.php(92): FoF\Upload\Repositories\FileRepository->createFileFromUpload()
#7 [internal function]: FoF\Upload\Commands\UploadHandler->FoF\Upload\Commands\{closure}()
#8 /var/www/panel/vendor/illuminate/collections/Collection.php(695): array_map()
#9 /var/www/panel/vendor/fof/upload/src/Commands/UploadHandler.php(64): Illuminate\Support\Collection->map()
#10 /var/www/panel/vendor/illuminate/bus/Dispatcher.php(122): FoF\Upload\Commands\UploadHandler->handle()
#11 /var/www/panel/vendor/illuminate/pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}()
#12 /var/www/panel/vendor/illuminate/pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#13 /var/www/panel/vendor/illuminate/bus/Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then()
#14 /var/www/panel/vendor/illuminate/bus/Dispatcher.php(78): Illuminate\Bus\Dispatcher->dispatchNow()
#15 /var/www/panel/vendor/fof/upload/src/Api/Controllers/UploadController.php(60): Illuminate\Bus\Dispatcher->dispatch()
#16 /var/www/panel/vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php(116): FoF\Upload\Api\Controllers\UploadController->data()
#17 /var/www/panel/vendor/flarum/core/src/Http/RouteHandlerFactory.php(41): Flarum\Api\Controller\AbstractSerializeController->handle()
#18 /var/www/panel/vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php(27): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}()
#19 /var/www/panel/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\ExecuteRoute->process()
#20 /var/www/panel/vendor/fof/reactions/src/Middleware/BindRequestToContainer.php(35): Laminas\Stratigility\Next->handle()
#21 /var/www/panel/vendor/laminas/laminas-stratigility/src/Next.php(52): FoF\Reactions\Middleware\BindRequestToContainer->process()
#22 /var/www/panel/vendor/flarum/core/src/Api/Middleware/ThrottleApi.php(33): Laminas\Stratigility\Next->handle()
#23 /var/www/panel/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Api\Middleware\ThrottleApi->process()
#24 /var/www/panel/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(44): Laminas\Stratigility\Next->handle()
#25 /var/www/panel/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\CheckCsrfToken->process()
#26 /var/www/panel/vendor/flarum/core/src/Http/Middleware/ResolveRoute.php(69): Laminas\Stratigility\Next->handle()
#27 /var/www/panel/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\ResolveRoute->process()
#28 /var/www/panel/vendor/flarum/core/src/Http/Middleware/SetLocale.php(51): Laminas\Stratigility\Next->handle()
#29 /var/www/panel/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\SetLocale->process()
#30 /var/www/panel/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(58): Laminas\Stratigility\Next->handle()
#31 /var/www/panel/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\AuthenticateWithHeader->process()
#32 /var/www/panel/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(31): Laminas\Stratigility\Next->handle()
#33 /var/www/panel/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\AuthenticateWithSession->process()
#34 /var/www/panel/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(52): Laminas\Stratigility\Next->handle()
#35 /var/www/panel/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\RememberFromCookie->process()
#36 /var/www/panel/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Laminas\Stratigility\Next->handle()
#37 /var/www/panel/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\StartSession->process()
#38 /var/www/panel/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(29): Laminas\Stratigility\Next->handle()
#39 /var/www/panel/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Api\Middleware\FakeHttpMethods->process()
#40 /var/www/panel/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Laminas\Stratigility\Next->handle()
#41 /var/www/panel/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\ParseJsonBody->process()
#42 /var/www/panel/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle()
#43 /var/www/panel/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\HandleErrors->process()
#44 /var/www/panel/vendor/flarum/core/src/Http/Middleware/InjectActorReference.php(25): Laminas\Stratigility\Next->handle()
#45 /var/www/panel/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\InjectActorReference->process()
#46 /var/www/panel/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(77): Laminas\Stratigility\Next->handle()
#47 /var/www/panel/vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process()
#48 /var/www/panel/vendor/laminas/laminas-stratigility/src/Next.php(52): Middlewares\RequestHandler->process()
#49 /var/www/panel/vendor/middlewares/base-path-router/src/BasePathRouter.php(99): Laminas\Stratigility\Next->handle()
#50 /var/www/panel/vendor/laminas/laminas-stratigility/src/Next.php(52): Middlewares\BasePathRouter->process()
#51 /var/www/panel/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(36): Laminas\Stratigility\Next->handle()
#52 /var/www/panel/vendor/laminas/laminas-stratigility/src/Next.php(52): Laminas\Stratigility\Middleware\OriginalMessages->process()
#53 /var/www/panel/vendor/middlewares/base-path/src/BasePath.php(73): Laminas\Stratigility\Next->handle()
#54 /var/www/panel/vendor/laminas/laminas-stratigility/src/Next.php(52): Middlewares\BasePath->process()
#55 /var/www/panel/vendor/flarum/core/src/Http/Middleware/ProcessIp.php(24): Laminas\Stratigility\Next->handle()
#56 /var/www/panel/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\ProcessIp->process()
#57 /var/www/panel/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(77): Laminas\Stratigility\Next->handle()
#58 /var/www/panel/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(66): Laminas\Stratigility\MiddlewarePipe->process()
#59 /var/www/panel/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(73): Laminas\Stratigility\MiddlewarePipe->handle()
#60 /var/www/panel/vendor/flarum/core/src/Http/Server.php(45): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#61 /var/www/panel/public/index.php(26): Flarum\Http\Server->listen()
#62 {main}

php flarum info

Flarum core: 1.8.5
PHP version: 8.2.22
MySQL version: 10.6.18-MariaDB-0ubuntu0.22.04.1-log
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, SourceGuardian, mysqlnd, PDO, xml, bcmath, bz2, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, imap, intl, exif, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, smbclient, soap, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, libsmbclient, Zend OPcache
+----------------------------------+---------+--------+
| Flarum Extensions                |         |        |
+----------------------------------+---------+--------+
| ID                               | Version | Commit |
+----------------------------------+---------+--------+
| flarum-flags                     | v1.8.0  |        |
| flarum-approval                  | v1.8.1  |        |
| flarum-tags                      | v1.8.0  |        |
| flarum-suspend                   | v1.8.1  |        |
| fof-pages                        | 1.0.8   |        |
| fof-byobu                        | 1.3.6   |        |
| fof-ban-ips                      | 1.1.1   |        |
| fof-user-directory               | 1.3.3   |        |
| afrux-forum-widgets-core         | v0.1.7  |        |
| v17development-seo               | v1.8.1  |        |
| sycho-move-posts                 | v0.1.7  |        |
| nearata-twofactor                | v2.2.1  |        |
| mickmelon-coloured-usernames     | 0.1.1   |        |
| fof-username-request             | 1.2.4   |        |
| fof-user-bio                     | 1.4.0   |        |
| fof-upload                       | 1.5.5   |        |
| fof-subscribed                   | 1.1.4   |        |
| fof-socialprofile                | 1.1.6   |        |
| fof-sitemap                      | 2.2.1   |        |
| fof-secure-https                 | 1.1.3   |        |
| fof-reactions                    | 1.4.1   |        |
| fof-prevent-necrobumping         | 1.1.2   |        |
| fof-polls                        | 2.2.3   |        |
| fof-moderator-notes              | 1.2.2   |        |
| fof-mason                        | 1.2.1   |        |
| fof-links                        | 1.2.3   |        |
| fof-ignore-users                 | 1.2.1   |        |
| fof-geoip                        | 1.4.4   |        |
| fof-gamification                 | 1.6.7   |        |
| fof-forum-statistics-widget      | 1.2.1   |        |
| fof-formatting                   | 1.0.3   |        |
| fof-discussion-thumbnail         | 1.1.3   |        |
| fof-cookie-consent               | 1.1.3   |        |
| fof-best-answer                  | 1.4.5   |        |
| fof-anti-spam                    | 1.1.2   |        |
| fof-analytics                    | 1.1.0   |        |
| flarum-subscriptions             | v1.8.0  |        |
| flarum-sticky                    | v1.8.0  |        |
| flarum-statistics                | v1.8.0  |        |
| flarum-mentions                  | v1.8.3  |        |
| flarum-markdown                  | v1.8.0  |        |
| flarum-lock                      | v1.8.0  |        |
| flarum-lang-polish               | v1.8.2  |        |
| flarum-lang-english              | v1.8.0  |        |
| flarum-bbcode                    | v1.8.0  |        |
| davwheat-custom-sidenav-links    | 1.0.1   |        |
| clarkwinkelmann-post-permissions | 1.0.0   |        |
| clarkwinkelmann-group-list       | 1.0.0   |        |
| clarkwinkelmann-emojionearea     | 1.0.0   |        |
| clarkwinkelmann-circle-groups    | 1.0.1   |        |
| blomstra-turnstile               | 0.1.4   |        |
| askvortsov-moderator-warnings    | v0.6.3  |        |
| askvortsov-categories            | v3.1.0  |        |
| afrux-top-posters-widget         | v0.1.4  |        |
| afrux-online-users-widget        | v0.1.6  |        |
| afrux-news-widget                | v0.1.1  |        |
+----------------------------------+---------+--------+
Base URL: https://example.tld
Installation path: /var/www/panel
Queue driver: redis
Session driver: file
Scheduler status: Active
Mail driver: smtp
Debug mode: off

If need any additional information, please tell me.

playaz44 commented 2 months ago

Please forget about it, I am abandoning the Flarum project forever.