flarum / framework

Simple forum software for building great communities.
http://flarum.org/
6.35k stars 834 forks source link

When mention someone in a message error 500 happen #2706

Closed Hydrog3n closed 3 years ago

Hydrog3n commented 3 years ago

Bug Report

Current Behavior When we mention someone in a message an error happens. The message is well sent but the UI doesn't hide the reply box. The API response error 500 and unknown code

{"errors":[{"status":"500","code":"unknown"}]}

Steps to Reproduce

  1. Go to a discution'
  2. Click on reply
  3. Tag someone in the message
  4. See error

Expected Behavior Should send the message without error

Screenshots image

Environment

Flarum core 0.1.0-beta.16
PHP version: 8.0.2
Loaded extensions: Core, date, libxml, pcre, zlib, filter, hash, json, readline, Reflection, SPL, session, ctype, curl, dom, fileinfo, gd, gmp, iconv, intl, mbstring, openssl, PDO, standard, tokenizer, xmlwriter, zip, exif, mysqlnd, Phar, pdo_mysql, apcu, Zend OPcache
+----------------------+----------------+------------------------------------------+
| Flarum Extensions    |                |                                          |
+----------------------+----------------+------------------------------------------+
| ID                   | Version        | Commit                                   |
+----------------------+----------------+------------------------------------------+
| flarum-flags         | v0.1.0-beta.16 |                                          |
| fof-oauth            | 0.2.1          |                                          |
| fof-best-answer      | 0.4.0          |                                          |
| fof-moderator-notes  | 0.5.0          |                                          |
| fof-user-bio         | 0.5.0          |                                          |
| flarum-approval      | v0.1.0-beta.16 |                                          |
| flarum-emoji         | v0.1.0-beta.16 |                                          |
| flarum-suspend       | v0.1.0-beta.16 |                                          |
| flarum-sticky        | v0.1.0-beta.16 |                                          |
| flarum-likes         | v0.1.0-beta.16 |                                          |
| flarum-lock          | v0.1.0-beta.16 |                                          |
| flarum-tags          | v0.1.0-beta.16 |                                          |
| qiaeru-lang-french   | v1.10.0        |                                          |
| flarum-lang-english  | v0.1.0-beta.16 |                                          |
| flarum-markdown      | v0.1.0-beta.16 |                                          |
| flarum-mentions      | v0.1.0-beta.16 |                                          |
| flarum-statistics    | v0.1.0-beta.16 |                                          |
| flarum-subscriptions | v0.1.0-beta.16 |                                          |
| flarum-nicknames     | v0.1.0-beta.16 |                                          |
| flarum-bbcode        | v0.1.0-beta.16 |                                          |
| fof-recaptcha        | 0.3.1          |                                          |
| fof-nightmode        | 0.7.1          |                                          |
| fof-formatting       | 0.4.0          |                                          |
| v17development-seo   | v1.6.2         |                                          |
+----------------------+----------------+------------------------------------------+
Base URL: https://mondedie.fr
Installation path: /flarum/app
Debug mode: off

Additional Context Error log in flarum

2021-03-17 18:24:22] flarum.ERROR: InvalidArgumentException: No hint path defined for [flarum-mentions]. in /flarum/app/vendor/illuminate/view/FileViewFinder.php:112
Stack trace:
#0 /flarum/app/vendor/illuminate/view/FileViewFinder.php(90): Illuminate\View\FileViewFinder->parseNamespaceSegments()
#1 /flarum/app/vendor/illuminate/view/FileViewFinder.php(76): Illuminate\View\FileViewFinder->findNamespacedView()
#2 /flarum/app/vendor/illuminate/view/Factory.php(138): Illuminate\View\FileViewFinder->find()
#3 /flarum/app/vendor/illuminate/mail/Mailer.php(382): Illuminate\View\Factory->make()
#4 /flarum/app/vendor/illuminate/mail/Mailer.php(361): Illuminate\Mail\Mailer->renderView()
#5 /flarum/app/vendor/illuminate/mail/Mailer.php(273): Illuminate\Mail\Mailer->addContent()
#6 /flarum/app/vendor/flarum/core/src/Notification/NotificationMailer.php(51): Illuminate\Mail\Mailer->send()
#7 /flarum/app/vendor/flarum/core/src/Notification/Job/SendEmailNotificationJob.php(37): Flarum\Notification\NotificationMailer->send()
#8 /flarum/app/vendor/illuminate/container/BoundMethod.php(36): Flarum\Notification\Job\SendEmailNotificationJob->handle()
#9 /flarum/app/vendor/illuminate/container/Util.php(40): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#10 /flarum/app/vendor/illuminate/container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#11 /flarum/app/vendor/illuminate/container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#12 /flarum/app/vendor/illuminate/container/Container.php(611): Illuminate\Container\BoundMethod::call()
#13 /flarum/app/vendor/illuminate/bus/Dispatcher.php(128): Illuminate\Container\Container->call()
#14 /flarum/app/vendor/illuminate/pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}()
#15 /flarum/app/vendor/illuminate/pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#16 /flarum/app/vendor/illuminate/bus/Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then()
#17 /flarum/app/vendor/illuminate/queue/CallQueuedHandler.php(118): Illuminate\Bus\Dispatcher->dispatchNow()
#18 /flarum/app/vendor/illuminate/pipeline/Pipeline.php(128): Illuminate\Queue\CallQueuedHandler->Illuminate\Queue\{closure}()
#19 /flarum/app/vendor/illuminate/pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#20 /flarum/app/vendor/illuminate/queue/CallQueuedHandler.php(120): Illuminate\Pipeline\Pipeline->then()
#21 /flarum/app/vendor/illuminate/queue/CallQueuedHandler.php(70): Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware()
#22 /flarum/app/vendor/illuminate/queue/Jobs/Job.php(98): Illuminate\Queue\CallQueuedHandler->call()
#23 /flarum/app/vendor/illuminate/queue/SyncQueue.php(43): Illuminate\Queue\Jobs\Job->fire()
#24 /flarum/app/vendor/flarum/core/src/Notification/Driver/EmailNotificationDriver.php(51): Illuminate\Queue\SyncQueue->push()
#25 /flarum/app/vendor/flarum/core/src/Notification/Driver/EmailNotificationDriver.php(37): Flarum\Notification\Driver\EmailNotificationDriver->mailNotifications()
#26 /flarum/app/vendor/flarum/core/src/Notification/NotificationSyncer.php(110): Flarum\Notification\Driver\EmailNotificationDriver->send()
#27 /flarum/app/vendor/flarum/mentions/src/Listener/UpdateMentionsMetadataWhenVisible.php(66): Flarum\Notification\NotificationSyncer->sync()
#28 /flarum/app/vendor/flarum/mentions/src/Listener/UpdateMentionsMetadataWhenVisible.php(46): Flarum\Mentions\Listener\UpdateMentionsMetadataWhenVisible->syncUserMentions()
#29 /flarum/app/vendor/illuminate/events/Dispatcher.php(412): Flarum\Mentions\Listener\UpdateMentionsMetadataWhenVisible->handle()
#30 /flarum/app/vendor/illuminate/events/Dispatcher.php(237): Illuminate\Events\Dispatcher->Illuminate\Events\{closure}()
#31 /flarum/app/vendor/flarum/core/src/Foundation/DispatchEventsTrait.php(33): Illuminate\Events\Dispatcher->dispatch()
#32 /flarum/app/vendor/flarum/core/src/Post/Command/PostReplyHandler.php(104): Flarum\Post\Command\PostReplyHandler->dispatchEventsFor()
#33 /flarum/app/vendor/flarum/core/src/Notification/NotificationSyncer.php(148): Flarum\Post\Command\PostReplyHandler->Flarum\Post\Command\{closure}()
#34 /flarum/app/vendor/flarum/core/src/Post/Command/PostReplyHandler.php(105): Flarum\Notification\NotificationSyncer->onePerUser()
#35 /flarum/app/vendor/illuminate/bus/Dispatcher.php(122): Flarum\Post\Command\PostReplyHandler->handle()
#36 /flarum/app/vendor/illuminate/pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}()
#37 /flarum/app/vendor/illuminate/pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#38 /flarum/app/vendor/illuminate/bus/Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then()
#39 /flarum/app/vendor/illuminate/bus/Dispatcher.php(78): Illuminate\Bus\Dispatcher->dispatchNow()
#40 /flarum/app/vendor/flarum/core/src/Api/Controller/CreatePostController.php(61): Illuminate\Bus\Dispatcher->dispatch()
#41 /flarum/app/vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php(102): Flarum\Api\Controller\CreatePostController->data()
#42 /flarum/app/vendor/flarum/core/src/Api/Controller/AbstractCreateController.php(22): Flarum\Api\Controller\AbstractSerializeController->handle()
#43 /flarum/app/vendor/flarum/core/src/Http/RouteHandlerFactory.php(38): Flarum\Api\Controller\AbstractCreateController->handle()
#44 /flarum/app/vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php(27): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}()
#45 /flarum/app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\ExecuteRoute->process()
#46 /flarum/app/vendor/flarum/core/src/Api/Middleware/ThrottleApi.php(33): Laminas\Stratigility\Next->handle()
#47 /flarum/app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Api\Middleware\ThrottleApi->process()
#48 /flarum/app/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(44): Laminas\Stratigility\Next->handle()
#49 /flarum/app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\CheckCsrfToken->process()
#50 /flarum/app/vendor/flarum/core/src/Http/Middleware/ResolveRoute.php(67): Laminas\Stratigility\Next->handle()
#51 /flarum/app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\ResolveRoute->process()
#52 /flarum/app/vendor/flarum/core/src/Http/Middleware/SetLocale.php(50): Laminas\Stratigility\Next->handle()
#53 /flarum/app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\SetLocale->process()
#54 /flarum/app/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(55): Laminas\Stratigility\Next->handle()
#55 /flarum/app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\AuthenticateWithHeader->process()
#56 /flarum/app/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(32): Laminas\Stratigility\Next->handle()
#57 /flarum/app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\AuthenticateWithSession->process()
#58 /flarum/app/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(52): Laminas\Stratigility\Next->handle()
#59 /flarum/app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\RememberFromCookie->process()
#60 /flarum/app/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Laminas\Stratigility\Next->handle()
#61 /flarum/app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\StartSession->process()
#62 /flarum/app/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(29): Laminas\Stratigility\Next->handle()
#63 /flarum/app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Api\Middleware\FakeHttpMethods->process()
#64 /flarum/app/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Laminas\Stratigility\Next->handle()
#65 /flarum/app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\ParseJsonBody->process()
#66 /flarum/app/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle()
#67 /flarum/app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\HandleErrors->process()
#68 /flarum/app/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(84): Laminas\Stratigility\Next->handle()
#69 /flarum/app/vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process()
#70 /flarum/app/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\RequestHandler->process()
#71 /flarum/app/vendor/middlewares/base-path-router/src/BasePathRouter.php(101): Laminas\Stratigility\Next->handle()
#72 /flarum/app/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\BasePathRouter->process()
#73 /flarum/app/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(42): Laminas\Stratigility\Next->handle()
#74 /flarum/app/vendor/laminas/laminas-stratigility/src/Next.php(61): Laminas\Stratigility\Middleware\OriginalMessages->process()
#75 /flarum/app/vendor/middlewares/base-path/src/BasePath.php(53): Laminas\Stratigility\Next->handle()
#76 /flarum/app/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\BasePath->process()
#77 /flarum/app/vendor/flarum/core/src/Http/Middleware/ProcessIp.php(24): Laminas\Stratigility\Next->handle()
#78 /flarum/app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\ProcessIp->process()
#79 /flarum/app/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(84): Laminas\Stratigility\Next->handle()
#80 /flarum/app/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(73): Laminas\Stratigility\MiddlewarePipe->process()
#81 /flarum/app/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(96): Laminas\Stratigility\MiddlewarePipe->handle()
#82 /flarum/app/vendor/flarum/core/src/Http/Server.php(44): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#83 /flarum/app/public/index.php(26): Flarum\Http\Server->listen()
askvortsov1 commented 3 years ago

The error message implies that it can't load the email. That particular error usually means that some extension is using the outdated system of registering views. However, that's not what your extension list suggests (I don't think any of your non bundled extensions use views). It doesn't seem to be a core issue as it doesn't occur locally. Could you try disabling all third party extensions and trying again, then re-enabling them one by one?

Hydrog3n commented 3 years ago

Hello @askvortsov1 Thank you I will try this it's the flarum-mentions that make me think it was more native extension. I will try to deactivate and enabled one by one.

askvortsov1 commented 3 years ago

Any luck with this?

Ornanovitch commented 3 years ago

@Hydrog3n I had the very same problem and it has been fixed by @askvortsov1 in https://github.com/flarum/nicknames/commit/5457a6d7ca97622b05ceb676673c09660e087844 which is tagged in nicknames 0.1.0-beta.16.1

Hydrog3n commented 3 years ago

Any luck with this?

So sorry, I forgot to update, looks ok now we deactivate and reactivate one by one. We have forgotten to check which one was causing the problem.

We will maybe tag the docker image to update then.

askvortsov1 commented 3 years ago

Closing as it's a extension issue. Thanks for the info!