Skip to content
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

[7.x] Fix rendering plain text only notifications #33803

Merged
merged 1 commit into from
Aug 10, 2020
Merged

[7.x] Fix rendering plain text only notifications #33803

merged 1 commit into from
Aug 10, 2020

Conversation

pawelmysior
Copy link
Contributor

The ability to send plain text versions of notifications alongside html version was introduced in #33725. In #33781 I've made small fixes that allow to send plain text only notifications.

When the notification is sent, the view is built as an associative array using the buildView() method of the MailChannel class. The array returned by this method is passed to the Mailer class, which parses this view array in the parseView() method.

However, when the notifications is rendered (for previewing in the browser), the view is built as a numeric array in the render() method. When it is passed to the Mailer class, it is parsed differently in the parseView() method. If the notifications has the html view set, it is not a problem, the result is the same. But it the html view is null, the result of parseView() is different.

This PR aims to fix this inconsistency, by building the view as an associative array in the MailMessage::render() method.

@pawelmysior pawelmysior changed the title Fix rendering plain text only notifications [7.x] Fix rendering plain text only notifications Aug 10, 2020
@driesvints
Copy link
Member

Should we add a test for this?

@driesvints
Copy link
Member

Sent in #33816 to revert this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants