3 months later

Hello,

Thank you for this superb application, which works wonders when coupled with email discussion lists (Sympa works very well together).

Only, I have a small problem when I want to change the translation string of flarum-mentions.email.user_mentioned.subject

If I leave the original value, the subject of the email is displayed correctly. But if I save a new value in FoF-Linguist (even for an identical value): the subject is displayed with a brace at the end -> }
Same problem for other character strings, for example with fof-follow-tags.email.body.newPostInTag, {recipient_display_name} {actor_display_name} (etc) are replaced by their value but surrounded by braces -> { }

Thank you very much & happy new year !

    ToneLune I have run into this also already a couple of times. In the case of email translations within fof/follow-tags you can just not include them, and it will still parse correctly. For these sorts of situations, you can always check out the Blade Templates and verify how it's being parsed; in your case it would be /resources/views/emails/newPost.blade.php. Hope this helps!

    Hello, thanks for your help !

    Unfortunately, I didn't quite understand how to resolve my problem with your instructions?

    In /resources/views/emails/newPost.blade.php :

    {!! $translator->trans('fof-follow-tags.email.body.newPostInTag', [
        'recipient_display_name' => $user->display_name,
        'actor_display_name' => $blueprint->post->user->display_name,
        'discussion_title' => $blueprint->post->discussion->title,
        'post_url' => $url->to('forum')->route('discussion', ['id' => $blueprint->post->discussion_id, 'near' => $blueprint->post->number]),
        'post_content' => $blueprint->post->content,
    ]) !!}

    What should I modify?

    Edit : I simply modified the translation lines in the .yml file of my language pack (/vendor/flarum-lang/french/locale/fof-follow-tags.yml for me), everything is displayed correctly.

    6 months later

    datitisev

    Warning: Attempt to read property "user_id" on null in exmaple.com/vendor/fof/follow-tags/src/AddTagSubscriptionAttribute.php on line 41

    I got this problem

      xhz588 Clark is correct - PHP warnings should be disabled in prod. But the report is still helpful.

      I've released v1.2.5 also addressing this.

        clarkwinkelmann

        I got Fatal error just after that warning:

        Fatal error: Uncaught Laminas\HttpHandlerRunner\Exception\EmitterException: Output has been emitted previously; cannot emit response in example.com/vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php:20 Stack trace: #0 example.com/vendor/laminas/laminas-httphandlerrunner/src/Emitter/SapiEmitterTrait.php(42): Laminas\HttpHandlerRunner\Exception\EmitterException::forOutputSent() #1 example.com/vendor/laminas/laminas-httphandlerrunner/src/Emitter/SapiEmitter.php(21): Laminas\HttpHandlerRunner\Emitter\SapiEmitter->assertNoPreviousOutput() #2example.com/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(75): Laminas\HttpHandlerRunner\Emitter\SapiEmitter->emit() #3 example.com/vendor/flarum/core/src/Http/Server.php(45): Laminas\HttpHandlerRunner\RequestHandlerRunner->run() #4 example.com/public/index.php(26): Flarum\Http\Server->listen() #5 {main} thrown in example.com/vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php on line 20

        datitisev

          xhz588 The fatal error is caused by the warning, since it prints output to the response.

            datitisev

            Sorry I'm a bit unfamiliar with php, what is the correct way for disable warnings for flarum? I did some research and there are 10+ ways for doing it.

              xhz588 Nah - the "output has been emitted previously" error actually means something happened before it that prevented the page content from being returned from the server normally. Usually caused by warnings & deprecations that just print out and don't stop the request from processing, which makes the server attempt to send a response as if nothing has been returned yet.

              xhz588 You do this through the php.ini configuration file. It does seem like the default PHP config is to not disable warnings though. But I think that doesn't matter since it display_errors should be off in prod, so warnings should just be logged. See php/php-srcblob/master/php.ini-production#L97-L115

                2 months later
                2 months later

                I installed this plugin.
                I have figured out how to subscribe to a topic.
                But where is the button to subscribe to Tags (forums)?

                8 days later
                18 days later

                Is it possible to have a "Following" tab like with the Subscriptions extension? Where it will show you all discussions that you are currently following.

                2 months later