Quantcast
Channel: Zammad - Community - Latest posts
Viewing all articles
Browse latest Browse all 6743

Problem with application_wrapper.html.erb

$
0
0

Infos:

  • Used Zammad version: 6.3.1-1718860451.0f341764.bullseye
  • Used Zammad installation type: package
  • Operating system: Debian 12
  • Browser + version: Chrome, 126.0.6478.127

Expected behavior:

When sending emails, the styles defined in application_wrapper.html.erb are used.

Actual behavior:

We recently upgraded Version 5.3 to 6.3, respecting the upgrade path, so we did the step to 6.0 inbetween.
Recently, we noticed that our outgoing messages aren’t using the configured font/size settings anymore.

We’ve investigated and found that there might be a problem with the ###html# variable within applicaiton_wrapper.html.erb.

In short, we used a slightly modified .erb file, so we swapped for the original .erb file which we kept, just in case.
However, even with the original .erb file our configured font/size settings weren’t beieng used.

We tried both, setting font/size via the rails console Setting.set(‘html_email_css_font’,…) and, after that, writing our desired settings into the .erb file, removing the ###html_email_css_font### variable, neither worked.

We kept investigating, removing style-settings bracket by bracket, to find out where the file breaks.
However, it wasn’t until we removed ###html### (and overwrote it with dummy-test, making outgoing e-mails completely useless ofc.) that we saw our style-settings taking effect again.

From Outlook, we pulled the source files of the mails, containing the html formatting.

We found that, when ###html### is used, zammad places a tag right after the first meta tag, thus rendering the later defined style settings ineffective.
When we replaced ###html### with a string, suddenly the emails were beeing sent with correct settings, no extra tags anywhere in sight.

I’ve attached screenshots, our used .erb files and the html-source files from the test emails for comparison.
Hope this is an easy fix! :slight_smile:

Modified .erb (click for more details) original .erb (click for more details) HTML Source received while using ###html### (click for more details) HTML Source received when replacing ###html### with static text (click for more details)



Viewing all articles
Browse latest Browse all 6743

Trending Articles