Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Messenger] Templated email messages fails when sending async (thru messenger transport)#39458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@ronnylt
Copy link
Contributor

QA
Branch?5.x
Bug fix?yes
New feature?no
TicketsFix#39190
LicenseMIT

@ronnylt
Copy link
ContributorAuthor

What is the intended behaviour when queueing template messages, doing the rendering before enqueuing the message for async sending, OR just before actually sending the message to the mailer transport?

In other words, is rendering intended to be done before dispatching to the messenger's bus?

I think this clarification is important for a fix.

@ronnyltronnyltforce-pushed thefailing-test-templaed-queued-emails branch from6af42cd tofa6e8e7CompareDecember 11, 2020 12:31
@jderusse
Copy link
Member

jderusse commentedDec 11, 2020
edited
Loading

One benefit of rendering the template BEFORE queuing, is: the extensions have access to the request context.

  • can render absolute links with scheme and domain
  • have access to the logged user

When switching to async, you have to provide the needed context (ie.framework.router.default_uri, or passing context in therender method).

Rendering template is fast. I'm not sure adding such complexity and bugs worth it.

ronnylt reacted with thumbs up emoji

@jderussejderusse added this to the5.x milestoneDec 11, 2020
@carsonbotcarsonbot changed the titleTemplated email messages fails when sending async (thru messenger transport)[Messenger] Templated email messages fails when sending async (thru messenger transport)Dec 11, 2020
@ronnyltronnyltforce-pushed thefailing-test-templaed-queued-emails branch from859598c to9cf10d5CompareDecember 12, 2020 07:11
@ronnyltronnyltforce-pushed thefailing-test-templaed-queued-emails branch from9cf10d5 to3c3c39fCompareDecember 12, 2020 07:12
@ronnylt
Copy link
ContributorAuthor

@jderusse +1 on rendering before queuing, this also allows to have a minimalist worker application that only takes care of sending ready-to-send emails.

The proposed fix removes the cloning of the message before sending it to theEventDispatcherInterface. This way the message that is transformed by body renderers, etc... is the same that is actually enqueued.

Not sure if the cloning is needed or if removing this can have any other side-effects.

Any ideas? Thanks.

@ronnylt
Copy link
ContributorAuthor

Hi! Can anyone provide any updates or guidance on how to proceed?

Thanks!

@mburtscher
Copy link

Really looking forward to this fix! The change actually revert's@fabpot's intention to not use the same variable name as changed in commit829566c. The actual bug was introduced later in commitfc4be48 with removing the second event dispatched.

ronnylt, perebusquets, and lucagtc reacted with thumbs up emoji

@perebusquets
Copy link

Also looking forward to implement this fix, any idea on when can we expect this to be fixed?

@fabpotfabpot modified the milestones:5.4,6.1Nov 16, 2021
@fabpotfabpot modified the milestones:6.1,6.2May 20, 2022
@fabpot
Copy link
Member

Closing as this fix is not valid.
See#47052 and#47049 for more explanations.

@fabpotfabpot closed thisJul 24, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotAwaiting requested review from fabpot

Assignees

No one assigned

Projects

None yet

Milestone

6.2

Development

Successfully merging this pull request may close these issues.

Templated email messages fails when sending async

6 participants

@ronnylt@jderusse@mburtscher@perebusquets@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp