FriendsOfFlarum Pretty Mail
Sinamics Yep, these updated versions will only be compatible with beta 15. Older versions can be used if your flarum is still on beta 14
- Edited
askvortsov Older versions can be used if your flarum is still on beta 14
but beta 15 is not released yet? or im missing something?
update:
nvm, i found my answer here.
https://discuss.flarum.org/d/25185-dev-diary-beta-15/70
Thank you
- Edited
I am hitting an error which I believe could possibly be related to karaok and breaking changes, but I haven't been able to narrow it down as I've updated my templates using the new supported paramters for urls and such. Can see from my error logs on line 6 FoF\FollowTags\Notifications\NewDiscussionBlueprint
, so I'd have thought the template used for new discussions might be off but from the templates available to configure (seen below) I can only see that coming from Default template, and that template is working for notifications such as new user. Perhaps I am headed down the wrong path, any suggestions where I can look would be appreciated.
- Default Template
- Flarum/subscriptions New Post Email
- Flarum/mentions User Mentioned Email
- Flarum/mentions Post Mentioned Email
Because of this error, new discussions posted throw an error on submission "Oops, an unknown error occurred" and the page is not refreshed and is still on the new discussion modal, even though the discussions was successfully posted. Email notification obviously is failing though. It was also suggested in another thread that the undefined method for illiminate container url could come from incompatible or outdated extension, however I am running the latest for follow-tags and pretty mail which is where the errors seem to originate from. If I disable pretty mail, there is no error thrown on new discussion posts under tags that would trigger these notifications.
[2021-02-16 17:00:52] flarum.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Illuminate\Container\Container::url() in /usr/share/nginx/flarum/storage/views/4bdea7e04c28f191f4dba43e89f72ea10ac2eafa.php:7
Stack trace:
#0 /usr/share/nginx/flarum/vendor/illuminate/view/Engines/PhpEngine.php(43): include()
#1 /usr/share/nginx/flarum/vendor/illuminate/view/Engines/CompilerEngine.php(59): Illuminate\View\Engines\PhpEngine->evaluatePath('/usr/share/ngin...', Array)
#2 /usr/share/nginx/flarum/vendor/illuminate/view/View.php(143): Illuminate\View\Engines\CompilerEngine->get('/usr/share/ngin...', Array)
#3 /usr/share/nginx/flarum/vendor/illuminate/view/View.php(126): Illuminate\View\View->getContents()
#4 /usr/share/nginx/flarum/vendor/illuminate/view/View.php(91): Illuminate\View\View->renderContents()
#5 /usr/share/nginx/flarum/vendor/fof/pretty-mail/src/Overrides/NotificationMailer.php(88): Illuminate\View\View->render()
#6 /usr/share/nginx/flarum/vendor/flarum/core/src/Notification/Job/SendEmailNotificationJob.php(37): FoF\PrettyMail\Overrides\NotificationMailer->send(Object(FoF\FollowTags\Notifications\NewDiscussionBlueprint), Object(Flarum\User\User))
#6 /usr/share/nginx/flarum/vendor/flarum/core/src/Notification/Job/SendEmailNotificationJob.php(37): FoF\PrettyMail\Overrides\NotificationMailer-
>send(Object(FoF\FollowTags\Notifications\NewDiscussionBlueprint), Object(Flarum\User\User))
#7 /usr/share/nginx/flarum/vendor/illuminate/container/BoundMethod.php(36): Flarum\Notification\Job\SendEmailNotificationJob->handle(Object(FoF\PrettyMail\Overrides\NotificationMailer))
#8 /usr/share/nginx/flarum/vendor/illuminate/container/Util.php(37): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#9 /usr/share/nginx/flarum/vendor/illuminate/container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#10 /usr/share/nginx/flarum/vendor/illuminate/container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Container\Container), Array, Object(Closure))
#11 /usr/share/nginx/flarum/vendor/illuminate/container/Container.php(590): Illuminate\Container\BoundMethod::call(Object(Illuminate\Container\Container), Array, Array, NULL)
#12 /usr/share/nginx/flarum/vendor/illuminate/bus/Dispatcher.php(94): Illuminate\Container\Container->call(Array)
...
sh-4.4$ php flarum info
Flarum core 0.1.0-beta.15
PHP version: 7.4.6
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, pcntl, readline, Reflection, SPL, session, standard, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, gmp, iconv, intl, json, ldap, exif, mysqlnd, PDO, Phar, SimpleXML, sockets, sqlite3, tokenizer, xml, xmlwriter, xsl, mysqli, pdo_mysql, pdo_sqlite, xmlreader, zip, Zend OPcache
+------------------------------------+------------------+--------+
| Flarum Extensions | | |
+------------------------------------+------------------+--------+
| ID | Version | Commit |
+------------------------------------+------------------+--------+
| flarum-approval | v0.1.0-beta.15 | |
| flarum-bbcode | v0.1.0-beta.15 | |
| flarum-emoji | v0.1.0-beta.15 | |
| flarum-lang-english | v0.1.0-beta.15 | |
| flarum-flags | v0.1.0-beta.15 | |
| flarum-lock | v0.1.0-beta.15 | |
| flarum-markdown | v0.1.0-beta.15 | |
| flarum-mentions | v0.1.0-beta.15 | |
| flarum-statistics | v0.1.0-beta.15 | |
| flarum-sticky | v0.1.0-beta.15.1 | |
| flarum-suspend | v0.1.0-beta.15 | |
| flarum-tags | v0.1.0-beta.15 | |
| michaelbelgium-discussion-views | v5.0.0 | |
| clarkwinkelmann-emojionearea | 0.3.0 | |
| askvortsov-discussion-templates | v0.3.0 | |
| askvortsov-moderator-warnings | v0.4.1 | |
| fof-best-answer | 0.3.6 | |
| fof-byobu | 0.6.1 | |
| fof-default-user-preferences | 0.3.1 | |
| fof-follow-tags | 0.6.5 | |
| fof-formatting | 0.3.1 | |
| fof-github-autolink | 0.1.5 | |
| fof-links | 0.5.4 | |
| fof-masquerade | 0.3.6 | |
| fof-merge-discussions | 0.5.1 | |
| fof-moderator-notes | 0.4.3 | |
| fof-polls | 0.3.2 | |
| fof-profile-image-crop | 0.2.1 | |
| fof-realtimedate | 0.2.1 | |
| fof-split | 0.6.0 | |
| fof-upload | 0.12.10 | |
| fof-user-bio | 0.4.2 | |
| fof-user-directory | 0.5.0 | |
| therealsujitk-gifs | v2.0.0 | |
| zerosonesfun-hashtags | 4.0.3 | |
| antoinefr-money | v0.11.0 | |
| clarkwinkelmann-who-read | 1.2.2 | |
| nearata-tags-color-generator | v1.2.0 | |
| fof-socialprofile | 0.2.3 | |
| clarkwinkelmann-author-change | 0.2.2 | |
| flarum-likes | v0.1.0-beta.15 | |
| flarum-nicknames | v0.1.0-beta.15 | |
| clarkwinkelmann-follow-tags-prompt | 0.2.0 | |
| fof-analytics | 0.11.0 | |
| v17development-blog | v0.2.1 | |
| flarum-subscriptions | v0.1.0-beta.15 | |
| fof-pretty-mail | 0.3.0 | |
| fof-forum-statistics-widget | 0.4.0 | |
| fof-subscribed | 0.4.1 | |
| maicol07-sso | 1.8.1 | |
| glowingblue-composer-preview | 0.2.0 | |
| fof-webhooks | 0.5.0 | |
| nearata-embed-video | v1.1.1 | |
+------------------------------------+------------------+--------+
Hi, it looks like this on the line in the mail, how it works
SKevo check out the support thread I opened, I got it resolved by manually clearing out the blade views with the help of @askvortsov. Issue created in GH and they have been active on it.
https://discuss.flarum.org/d/26270-call-to-undefined-method-illuminatecontainercontainerurl
I found the extension not compatible extensions for release 16.
TypeError: Argument 1 passed to Illuminate\Mail\Mailer::__construct() must be of the type string, object given, called in /app/vendor/fof/pretty-mail/src/Providers/MailerProvider.php on line 29 and defined in /app/vendor/illuminate/mail/Mailer.php:103
MailerProvider.php line 29
$mailer = new Mailer($view, $container['swift.mailer'], $container['events']);
Solution:
$mailer = new Mailer('flarum', $view, $container['swift.mailer'], $container['events']);
Joe_Zhu I found the extension not compatible extensions for release 16.
Have a look here: https://extiverse.com/ to find out which extensions are compatible with beta 16.
It would be great if PrettyMail could be extended by other extensions, to hook in and offer their own templates that can all be customized from one location for whatever events/notifications they are owners of. I don't know if something like this could be enabled purely through a community extension, or it requires anything to be done in core. This would allow communities to offer consistent email notifications. As every extension developer today could offer slightly different styles, supporting html or not, different grammar for non customizable strings; any email notifications not covered by PrettyMail templates as a result can can feel a bit fragmented or disjointed. That is why I really like what PrettyMail has done, it would just be nice to see it extended everywhere.
0.4.0
- Beta 16 compatibility
Hi have a problem on my FreeFlarum forum
After a discussion with @SKevo on that page it appears that there are lot of errors due to fof/pretty-mail
Please find the report:
flarum.ERROR: Exception: Error: Call to undefined method Illuminate\Container\Container::url() in /app/vendor/fof/pretty-mail/src/BladeCompiler.php(28) : eval()'d code:50
Stack trace:
#0 /app/vendor/fof/pretty-mail/src/BladeCompiler.php(28): eval()
#1 /app/vendor/fof/pretty-mail/src/Overrides/NotificationMailer.php(91): FoF\PrettyMail\BladeCompiler::render()
#2 /app/vendor/flarum/core/src/Notification/Job/SendEmailNotificationJob.php(37): FoF\PrettyMail\Overrides\NotificationMailer->send()
#3 /app/vendor/illuminate/container/BoundMethod.php(36): Flarum\Notification\Job\SendEmailNotificationJob->handle()
#4 /app/vendor/illuminate/container/Util.php(40): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#5 /app/vendor/illuminate/container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#6 /app/vendor/illuminate/container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#7 /app/vendor/illuminate/container/Container.php(614): Illuminate\Container\BoundMethod::call()
#8 /app/vendor/illuminate/bus/Dispatcher.php(128): Illuminate\Container\Container->call()
#9 /app/vendor/illuminate/pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}()
#10 /app/vendor/illuminate/pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#11 /app/vendor/illuminate/bus/Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then()
#12 /app/vendor/illuminate/queue/CallQueuedHandler.php(120): Illuminate\Bus\Dispatcher->dispatchNow()
#13 /app/vendor/illuminate/pipeline/Pipeline.php(128): Illuminate\Queue\CallQueuedHandler->Illuminate\Queue\{closure}()
#14 /app/vendor/illuminate/pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#15 /app/vendor/illuminate/queue/CallQueuedHandler.php(122): Illuminate\Pipeline\Pipeline->then()
#16 /app/vendor/illuminate/queue/CallQueuedHandler.php(70): Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware()
#17 /app/vendor/illuminate/queue/Jobs/Job.php(98): Illuminate\Queue\CallQueuedHandler->call()
#18 /app/vendor/illuminate/queue/SyncQueue.php(43): Illuminate\Queue\Jobs\Job->fire()
#19 /app/vendor/flarum/core/src/Notification/Driver/EmailNotificationDriver.php(51): Illuminate\Queue\SyncQueue->push()
#20 /app/vendor/flarum/core/src/Notification/Driver/EmailNotificationDriver.php(37): Flarum\Notification\Driver\EmailNotificationDriver->mailNotifications()
#21 /app/vendor/flarum/core/src/Notification/NotificationSyncer.php(110): Flarum\Notification\Driver\EmailNotificationDriver->send()
#22 /app/vendor/flarum/mentions/src/Listener/UpdateMentionsMetadataWhenVisible.php(82): Flarum\Notification\NotificationSyncer->sync()
#23 /app/vendor/flarum/mentions/src/Listener/UpdateMentionsMetadataWhenVisible.php(51): Flarum\Mentions\Listener\UpdateMentionsMetadataWhenVisible->syncPostMentions()
#24 /app/vendor/illuminate/events/Dispatcher.php(412): Flarum\Mentions\Listener\UpdateMentionsMetadataWhenVisible->handle()
#25 /app/vendor/illuminate/events/Dispatcher.php(237): Illuminate\Events\Dispatcher->Illuminate\Events\{closure}()
#26 /app/vendor/flarum/core/src/Foundation/DispatchEventsTrait.php(33): Illuminate\Events\Dispatcher->dispatch()
#27 /app/vendor/flarum/core/src/Post/Command/PostReplyHandler.php(104): Flarum\Post\Command\PostReplyHandler->dispatchEventsFor()
#28 /app/vendor/flarum/core/src/Notification/NotificationSyncer.php(148): Flarum\Post\Command\PostReplyHandler->Flarum\Post\Command\{closure}()
#29 /app/vendor/flarum/core/src/Post/Command/PostReplyHandler.php(105): Flarum\Notification\NotificationSyncer->onePerUser()
#30 /app/vendor/illuminate/bus/Dispatcher.php(122): Flarum\Post\Command\PostReplyHandler->handle()
#31 /app/vendor/illuminate/pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}()
#32 /app/vendor/illuminate/pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#33 /app/vendor/illuminate/bus/Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then()
#34 /app/vendor/illuminate/bus/Dispatcher.php(78): Illuminate\Bus\Dispatcher->dispatchNow()
#35 /app/vendor/flarum/core/src/Api/Controller/CreatePostController.php(61): Illuminate\Bus\Dispatcher->dispatch()
#36 /app/vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php(102): Flarum\Api\Controller\CreatePostController->data()
#37 /app/vendor/flarum/core/src/Api/Controller/AbstractCreateController.php(22): Flarum\Api\Controller\AbstractSerializeController->handle()
#38 /app/vendor/flarum/core/src/Http/RouteHandlerFactory.php(38): Flarum\Api\Controller\AbstractCreateController->handle()
#39 /app/vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php(27): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}()
#40 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\ExecuteRoute->process()
#41 /app/vendor/flarum/core/src/Api/Middleware/ThrottleApi.php(33): Laminas\Stratigility\Next->handle()
#42 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Api\Middleware\ThrottleApi->process()
#43 /app/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(44): Laminas\Stratigility\Next->handle()
#44 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\CheckCsrfToken->process()
#45 /app/vendor/flarum/core/src/Http/Middleware/ResolveRoute.php(67): Laminas\Stratigility\Next->handle()
#46 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\ResolveRoute->process()
#47 /app/vendor/flarum/core/src/Http/Middleware/SetLocale.php(50): Laminas\Stratigility\Next->handle()
#48 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\SetLocale->process()
#49 /app/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(55): Laminas\Stratigility\Next->handle()
#50 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\AuthenticateWithHeader->process()
#51 /app/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(32): Laminas\Stratigility\Next->handle()
#52 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\AuthenticateWithSession->process()
#53 /app/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(52): Laminas\Stratigility\Next->handle()
#54 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\RememberFromCookie->process()
#55 /app/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Laminas\Stratigility\Next->handle()
#56 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\StartSession->process()
#57 /app/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(29): Laminas\Stratigility\Next->handle()
#58 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Api\Middleware\FakeHttpMethods->process()
#59 /app/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Laminas\Stratigility\Next->handle()
#60 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\ParseJsonBody->process()
#61 /app/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle()
#62 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\HandleErrors->process()
#63 /app/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(84): Laminas\Stratigility\Next->handle()
#64 /app/vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process()
#65 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\RequestHandler->process()
#66 /app/vendor/middlewares/base-path-router/src/BasePathRouter.php(101): Laminas\Stratigility\Next->handle()
#67 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\BasePathRouter->process()
#68 /app/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(42): Laminas\Stratigility\Next->handle()
#69 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Laminas\Stratigility\Middleware\OriginalMessages->process()
#70 /app/vendor/middlewares/base-path/src/BasePath.php(73): Laminas\Stratigility\Next->handle()
#71 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\BasePath->process()
#72 /app/vendor/flarum/core/src/Http/Middleware/ProcessIp.php(24): Laminas\Stratigility\Next->handle()
#73 /app/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\ProcessIp->process()
#74 /app/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(84): Laminas\Stratigility\Next->handle()
#75 /app/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(73): Laminas\Stratigility\MiddlewarePipe->process()
#76 /app/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(96): Laminas\Stratigility\MiddlewarePipe->handle()
#77 /app/vendor/flarum/core/src/Http/Server.php(44): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#78 /app/public/index.php(22): Flarum\Http\Server->listen()
#79 {main} in /app/vendor/fof/pretty-mail/src/BladeCompiler.php:40
Can you help me to fix the problem ? Many tks