-
-
Notifications
You must be signed in to change notification settings - Fork 824
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev/core#2814 Fix activity:sendEmail to use renderTemplate #21365
Conversation
(Standard links)
|
], | ||
'{contact.first_name} {$contact.first_name}', | ||
'{contact.first_name} {$contact.first_name}', | ||
'{contact.first_name} {$contact.first_name}', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
phpcs doesn't catch these indents I guess. Also down on line 1732.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not like phpcs - to be forgiving - fixed
Note that this does create a situation where more queries could occur but 1) this is only called in core from the email task - which is limited to 50 contacts so it is low-volume 2) this is really the start of a cleanup - there are other places where queries can be removed when we look at the total flow but I feel we need to get some simplification happening first & hence have picked on this focus as the first step (ie removing the calls to replaceContactTokens) 3) this seems to be called in extensions to some extent - and it should still work - there might be more queries but I think the 'support contract' for calling an unsupported function does not include it working in ways not required by core code
3986422
to
0952020
Compare
I agree test cover is good, and this PR adds more tests. Refactoring makes sense. |
Emails now have the literal |
@demeritcowboy yeah - looks like the tests focussed on the created activity & I didn't spot it wasn't passing through. Fix coming |
Overview
dev/core#2814 Fix activity:sendEmail to use renderTemplate
Before
ReplaceContactTokens
calledAfter
renderTemplate
calledTechnical Details
There is good test cover on this. I added an extra test for the scenario where smarty is enabled in this context. All other changes in the relevant tests are tidy ups & don't materially change them.
Note that this does create a situation where more queries could occur but
this is only called in core from the email task - which is limited to 50 contacts so it
is low-volume
this is really the start of a cleanup - there are other places where
queries can be removed when we look at the total flow but I feel we need to get
some simplification happening first & once we are doing things in a more consistent way I will be better placed to rationalise the queries
this seems to be called in extensions to some extent - and it should still work
unsupported function does not include it working in ways not required by
core code
Comments