Printing issues with HTML E-Mail (only email headers and big whitespace on first page)
Categories
(Thunderbird :: General, defect, P1)
Tracking
(thunderbird_esr115 fixed, thunderbird117 fixed)
People
(Reporter: mirco.iseli, Assigned: babolivier)
References
(Regression, )
Details
(Keywords: regression, testcase)
Attachments
(4 files)
71.59 KB,
image/png
|
Details | |
202.02 KB,
message/rfc822
|
Details | |
165.90 KB,
image/jpeg
|
Details | |
48 bytes,
text/x-phabricator-request
|
wsmwk
:
approval-comm-beta+
wsmwk
:
approval-comm-esr115+
|
Details | Review |
Steps to reproduce:
Try to Print out HTML E-mail
Actual results:
When I try to print an email, most of the time the resulting print will have the "Subject", "From", Date" and "To" on one page and the body of the email on the next page.
Comment 2•2 years ago
|
||
Micro, thanks for the research. I am not able to reproduce with beta or 115. Can you supply a testcase message that fails? Save it from thunderbird to a .eml files, and use "attach new file" to this bug report.
I see at https://www.reddit.com/r/Thunderbird/comments/155hcm0/printing_issues_thunderbird_115/ you cited a workaround "Change the view to HTML simplified"
Comment on attachment 9345221 [details]
Jährliche Wartung - JPL LERF Jean-Pierre <jp.lerf@gravograph.ch> - 2023-07-14 1602.eml
Sure, here is an email where I have the problem
Comment 5•2 years ago
|
||
Thanks for the testcase. I can reproduce this.
Updated•2 years ago
|
Comment 7•2 years ago
|
||
We also have this problem with 115.0.1 now - we found a culprit: Outlook - just sending a simple (HTML) mail with two lines of text from Outlook and trying to print the received mail in Thunderbird results in this behaviour. (Setting to simplified HTML circumvents the issue, but that page is then no longer correctly formatted of course).
Comment 8•2 years ago
•
|
||
These examples are just a few of the reports
Comment 9•2 years ago
|
||
Gentle ping to Brendan to see if he can investigate this.
Assignee | ||
Updated•2 years ago
|
Comment 10•2 years ago
|
||
I can confirm this. It's working in 102
Regressed from 2022-12-12 to 2022-12-15
https://hg.mozilla.org/comm-central/pushloghtml?startdate=2022-12-12+10%3A00&enddate=2022-12-15+14%3A00
https://hg.mozilla.org/mozilla-central/pushloghtml?startdate=2022-12-12+10%3A00&enddate=2022-12-15+14%3A00
Especially these look very suspicious
345c10ab15d2dde7c3a0ff0b79c504b7c8d1697e Jonathan Watt — Bug 1805477 - Prevent pages-per-sheet on macOS being double applied by system print dialog. r=dholbert
4d41c789765df2b93bbd333fc1fb09519173cd65 Jonathan Watt — Bug 1755974 - Fix Linux system print dialog to take the pages-per-sheet from print preview. r=dholbert
There is also
27f1702b315cff91726014f347463ba01c697dfa Jonathan Watt — Bug 1805716 - Stop overwriting the print settings passed to nsIPrintDialogService::showPrintDialog with saved prefs. r=dholbert
Updated•2 years ago
|
Assignee | ||
Comment 11•2 years ago
|
||
I didn't share this here, but thought it would be a helpful addition to the previous comment: as part of my ongoing investigation I've noticed that this regression seems to have been introduced in 2022-12-13. 20221212095103
(109.0a1) is the last daily build without it, 20221213103526
(110.0a1) is the first daily build with it.
According to mozregression (and some manual validation) these are the pushes that might have introduced the regression:
https://hg.mozilla.org/comm-central/pushloghtml?fromchange=fdfb7eff1ad4dd1e0eee3b204b30ada40744b9b6&tochange=e470d79066fb99178b0aa02a218913b214a33beb
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=d9b14b6b3a524e622cff771d8074baa88895f8f1&tochange=bd78e2e5b1fe852424cf7c035580e44de70ac135
So it's very likely due to a m-c push changing something under our feet. I'm continuing to investigate.
Assignee | ||
Comment 12•2 years ago
|
||
Especially these look very suspicious
345c10ab15d2dde7c3a0ff0b79c504b7c8d1697e Jonathan Watt — Bug 1805477 - Prevent pages-per-sheet on macOS being double applied by system print dialog. r=dholbert
4d41c789765df2b93bbd333fc1fb09519173cd65 Jonathan Watt — Bug 1755974 - Fix Linux system print dialog to take the pages-per-sheet from print preview. r=dholbertThere is also
27f1702b315cff91726014f347463ba01c697dfa Jonathan Watt — Bug 1805716 - Stop overwriting the print settings passed to nsIPrintDialogService::showPrintDialog with saved prefs. r=dholbert
Just to be sure, I went and check those three and I don't think any of those is our culprit here, since backing them out (and subsequently building TB) doesn't eliminate the bug.
Comment 13•2 years ago
|
||
Confirm same problem in beta 117.0b1
This issue is also being reported in the Support Forum
https://support.mozilla.org/en-US/questions/1420091
Current workaround is to set 'View' > 'Message Body as ' > 'Simple HTML'
In error console I get this line when I attempt to print using 'Original html'
Layout was forced before the page was fully loaded. If stylesheets are not yet loaded this may cause a flash of unstyled content. print.html
clicked on print.html
image shows error console
Assignee | ||
Comment 14•2 years ago
|
||
After chatting with Geoff on Thursday we identified that the cause of this bug (at least with the test case that has been submitted here) is the use of the page
CSS property, support for which was introduced in Firefox 110.0 (which is likely why this issue started happening with the first 110.0 beta). This typically isn't an issue for Firefox, but it's an issue for Thunderbird since we add some HTML (the headers table) before the email's body, so the rendering code puts both on different pages. I'm currently looking into what the best way to fix this bug should be.
Comment 15•2 years ago
|
||
Good detective work! Probably you should add a css override to messageBody.css like
@media print {
* { page: auto !important; }
}
Also, seems messageBody.css should be using a shared file with platform overrides if there are any differences in the files (see e.g. feedSubscribe.css for correct usage)
Assignee | ||
Comment 16•2 years ago
•
|
||
Ahah! I was looking at doing something like this but I forgot !important
was a thing - this does the trick, thanks!
(In reply to Magnus Melin [:mkmelin] from comment #15)
Also, seems messageBody.css should be using a shared file with platform overrides if there are any differences in the files (see e.g. feedSubscribe.css for correct usage)
Yes, I definitely agree. I'll try to take care of this as well now since I'm in the area.
Updated•2 years ago
|
Assignee | ||
Comment 17•2 years ago
|
||
Assignee | ||
Updated•2 years ago
|
Comment 18•2 years ago
|
||
Pushed by brendan@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/b4437d961ce6
Mutualise messageBody.css, and ignore CSS named pages when printing. r=mkmelin
Updated•2 years ago
|
Assignee | ||
Comment 20•2 years ago
|
||
(In reply to Wayne Mery (:wsmwk) from comment #19)
will patch also apply cleanly to 115?
I believe so. I'll file the uplift requests once the CI for this push has completed without raising issues about it.
Updated•2 years ago
|
Assignee | ||
Comment 21•2 years ago
|
||
Comment on attachment 9348141 [details]
Bug 1843628 - Mutualise messageBody.css, and ignore CSS named pages when printing. r=#thunderbird-reviewers
[Approval Request Comment]
Regression caused by (bug #): bug 1787947
User impact if declined: Printing an email which style uses named pages will result in the email's headers and body being printed on separate pages
Testing completed (on c-c, etc.): On c-c
Risk to taking this patch (and alternatives if risky): Should be fairly low risk, as the patch is mostly changed files that haven't been changed since before 115.0, and the functional change is covered by a test.
Comment 22•2 years ago
|
||
Comment on attachment 9348141 [details]
Bug 1843628 - Mutualise messageBody.css, and ignore CSS named pages when printing. r=#thunderbird-reviewers
[Triage Comment]
Approved for beta (coming next Monday)
Approved for esr115 even though it's not yet on beta - I'll test the nightly and if there are complications we will respin 115.1.1
Thanks for the tests
Comment 23•2 years ago
|
||
bugherder uplift |
Thunderbird 115.1.1:
https://hg.mozilla.org/releases/comm-esr115/rev/be3b5118bd1c
Comment 25•2 years ago
|
||
bugherder uplift |
Thunderbird 117.0b4:
https://hg.mozilla.org/releases/comm-beta/rev/0b58b5c56a95
Description
•