Skip to content

Fix crash at newsletter preview#6369

Merged
tramuntanal merged 2 commits intodevelopfrom
fix/layout-mailer_logo
Jul 31, 2020
Merged

Fix crash at newsletter preview#6369
tramuntanal merged 2 commits intodevelopfrom
fix/layout-mailer_logo

Conversation

@tramuntanal
Copy link
Copy Markdown
Contributor

@tramuntanal tramuntanal commented Jul 30, 2020

🎩 What? Why?

Since #5888 the decidim-core/app/views/layouts/decidim/_mailer_logo.html.erb partial was using @organization to access the organization object. It worked fine in the context of the NewsletterMailer but now this partial is also invoked from decidim-core/app/cells/decidim/newsletter_templates/image_text_cta/show.erb without a global @organization attribute. This use case happens when rendering the preview of newsletter templates from the administration panel.

This PR uses organization local variable instead of @organization.

📌 Related Issues

📋 Subtasks

  • Add CHANGELOG upgrade notes, if required
  • If there's a new public field, add it to GraphQL API
  • Add documentation regarding the feature
  • Add/modify seeds
  • Add tests
  • Another subtask

📷 Screenshots (optional)

Description

ivan-mr
ivan-mr previously approved these changes Jul 30, 2020
@Leusev Leusev self-requested a review July 30, 2020 14:20
Leusev
Leusev previously approved these changes Jul 30, 2020
Copy link
Copy Markdown
Contributor

@Leusev Leusev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok for me @tramuntanal 👍

@tramuntanal tramuntanal changed the title Fix crash from newsletter preview Fix crash at newsletter preview Jul 30, 2020
@tramuntanal tramuntanal dismissed stale reviews from Leusev and ivan-mr via dc79750 July 30, 2020 16:31
@tramuntanal tramuntanal force-pushed the fix/layout-mailer_logo branch 2 times, most recently from 559e8ab to dc79750 Compare July 31, 2020 10:49
@tramuntanal tramuntanal merged commit 573305e into develop Jul 31, 2020
@tramuntanal tramuntanal deleted the fix/layout-mailer_logo branch July 31, 2020 11:49
Quentinchampenois pushed a commit to Quentinchampenois/decidim that referenced this pull request Aug 14, 2020
* Do not use `@organization` from partial

* Test when the organization has a logo or not
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants