Repository navigation
fix(analytics): register AnalyticsExtension so newsletters render (#543) - #584
Merged
Merged
Conversation
#543 added the utm_links filter in src/Twig/AnalyticsExtension.php and uses it in templates/emails/newsletter.html.twig, but src/Twig is excluded from autowiring and the class was not listed in services.yaml. On prod (3.8.4) 'lint:twig templates/emails/newsletter.html.twig' fails with 'Unknown "utm_links" filter', so sending a newsletter fails.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Target branch:
main. Prod bug since 3.8.x (#543, 2026-10-02): newsletters cannot be rendered.#543 added the
utm_linksfilter insrc/Twig/AnalyticsExtension.phpand uses it intemplates/emails/newsletter.html.twig.src/Twigis excluded from autowiring inservices.yaml, and every other extension there is registered by hand; this one was not. On prod:So
send:massmailfails on the newsletter template. Transactional mails use other templates and are not affected.Fix: register the class with the
twig.extensiontag, like the two other extensions in the same file. It has no constructor arguments.Checked: on the route C branch (#582) the same registration makes
debug:twiglistutm_linksandlint:twigpass for the newsletter template. To re-check on stage after merge:bin/console --env=prod lint:twig templates/emails/newsletter.html.twig.Ship before the next newsletter goes out.