Closed Bug 1567105 Opened Last month Closed Last month

Only the header and footer are Printed for emails in Outlook Webapp

Categories

(Core :: Printing: Output, defect, P2)

68 Branch
defect

Tracking

()

VERIFIED FIXED
mozilla70
Tracking Status
relnote-firefox --- 68+
firefox-esr60 --- unaffected
firefox-esr68 68+ verified
firefox68 + verified
firefox69 + verified
firefox70 + verified

People

(Reporter: luc.mauchamp, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(4 files, 4 obsolete files)

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:67.0) Gecko/20100101 Firefox/67.0

Steps to reproduce:

When you print an email in Outlook Web App

Actual results:

Only the header and footer are Printed

according to some user reports this is regressing in firefox 68.

Component: Untriaged → Printing: Output
Keywords: regression
Product: Firefox → Core
Summary: Only the header and footer are Printed for emails in Outlook Webapp → Only the header and footer are Printed for emails in Outlook Webapp
Duplicate of this bug: 1566832
Duplicate of this bug: 1567833

Hi philipp,

I see you marked this ticket as duplicate of two closed tickets. If you are still experiencing this issue, please make sure to test if it's reproducible on the latest Nightly version. You can download it from here: https://nightly.mozilla.org/.

If you still have the issue please create a new profile, you have the steps here:https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles?redirectlocale=en-US&redirectslug=Managing-profiles#w_starting-the-profile-manager

Also, please check if this problem is reproduce on other browsers, like: chrome, internet explorer, etc and let us know your results.

It would be useful to have more steps to reproduce this bug, if possible can you try to print the email to a pdf file and attach a screenshot of the actual and the expected results?
For example expected result: the complete email, actual result: the incomplete email you get when printing.

Regards,

Flags: needinfo?(luc.mauchamp)
Attached image Firefox-OWA-druck.PNG (obsolete) —

We have the same problem and made the test some days ago.

Regressed by: 1535788

I'll take a look, thanks for finding the regression range.

Assignee: nobody → emilio
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(emilio)
Priority: -- → P2

[Tracking Requested - why for this release]:

I couldn't repro this from the free outlook.com web app (which AIUI is the same).

Two questions...

  • Does this happen when printing to file? Or only when printing to an actual printer? I don't have a printer handy so I was doing the first.
  • Does this happen in all mails or only on some? If not on all of them, is there any chance you could send me one of the emails that reproduces it for you?

It happens when printing to a printer AND to file.
Btw: It doesn't happen when using Google Chrome

It happens in all mails and on all Clients.

Hmm, then there is something I'm missing. You're on Windows, I guess, right? Maybe outlook is doing something different here on Linux. I'll try later today to repro on Windows later today...

Any hint to reproduce? I'll update the screencast with what I'm seeing.

Is this the right thing to test? Do I need a more complex email? I just wrote some simple email from Outlook's UI and sent it to myself.

Sorry for the spanish UI, this is a really old email account I only use for testing these days :)

Yes, that's the right thing.
We only have Windows (10) clients.

Ok, so I just tried to reproduce this on Windows 10 (my Windows version is 1809), and I cannot reproduce there on Firefox 68 nor on Nightly.

I could reproduce the printing issue but only once, and only because the email preview hadn't finished loaded (I'm on a pretty bad internet connection today).

I assume you're using some kind of private domain / paid service for Outlook, would there be any chance you could provide some testing account where you reproduce the issue in order to discard the cause being differences on my free account vs. yours? Would there be any specific Windows or Outlook configuration that I'm missing? Anything that like that that could come to mind?

(I also tried printing fairly more complex emails, and no issue in any of those either)

I created an account on our Exchange server for you:
https://outlook.uni-polster.de
user: emilio
password: Alvarez19

Alright, I can indeed reproduce there, thank you!

Attached file Stylesheet for upcoming test-case (obsolete) —

I think I managed to reduce it to a particular stylesheet in the print dialog

I hate quirks mode so much. My patch cloned the stylesheets a bit earlier, and as a result a wrong quirks mode is used, which makes a selector incorrectly match, and ends up with a layout that clips all content.

This is a sad bug :(

FWIW, the most reduced version of the stylesheet that I came up with before realizing what was going on is this:

body.printMail {
  height: auto;
  position: relative!important
}

.conductorContent {
  position: absolute;
  width: 100%;
  height: 100%
}

.printMail .conductorContent {
  height: auto
}

._n_x4 {
  overflow: hidden
}

._n_X4 {
  position: absolute;
  width: 100%;
  height: 100%
}

._n_X4 is supposed to match, but ._n_x4 isn't. We match it and as such make it incorrectly (a) be zero-sized, and (b) clip its content. Which means that it hides the whole page. :((

Attachment #9079934 - Attachment is obsolete: true
Attachment #9079954 - Attachment is obsolete: true
Attachment #9080016 - Attachment is obsolete: true
Attachment #9080019 - Attachment is obsolete: true

So that the stylist and CSS loader react appropriately.

Bug 1535788 causes the stylist to be created earlier, so it stopped grabbing the
already-updated compat mode.

I think the CSS loader stuff could already cause some issues before bug 1535788,
for what is worth.

Thanks so much for helping me figure this out itservice@! Vielen Dank!

Flags: needinfo?(luc.mauchamp)
Flags: needinfo?(emilio)

The reftest-paged tests don't trigger the document clone code-path (I realized
that after writing them), but I guess they don't hurt, the printpreview test
does fail without the previous patch.

Depends on D39053

Comment on attachment 9080079 [details]
Bug 1567105 - When cloning a document for printing, call SetCompatMode rather than silently copying over the compat mode. r=heycam,#style,jwatt

Beta/Release Uplift Approval Request

  • User impact if declined: Outlook OWA print mode doesn't print anything.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: open any of the test-cases attached to the bug, and try to print / print preview.
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): One-liner that prevents some quirks-mode state from getting out of sync.
  • String changes made/needed: none

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Outlook OWA doesn't print.
  • User impact if declined: See above.
  • Fix Landed on Version:
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): One-liner that prevents some quirks-mode state from getting out of sync.
  • String or UUID changes made by this patch: none
Attachment #9080079 - Flags: approval-mozilla-release?
Attachment #9080079 - Flags: approval-mozilla-esr68?
Attachment #9080079 - Flags: approval-mozilla-beta?
Attachment #9080080 - Flags: approval-mozilla-release? approval-mozilla-esr68?
Attachment #9080080 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c260ef59bde9
When cloning a document for printing, call SetCompatMode rather than silently copying over the compat mode. r=jwatt
https://hg.mozilla.org/integration/autoland/rev/2e8116048302
Tests. r=jwatt

Not sure there's going to be another 68 dot release at this point, but the patch is simple enough that I'll keep it on the radar for now in case there is.

Status: ASSIGNED → RESOLVED
Closed: Last month
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
QA Whiteboard: [qa-triaged]

I successfully reproduced the issue on Firefox Nightly 70.0a1 (2019-07-18) under Windows 10 (x64) using the "totally reduced testcase".

The issue is no longer reproducible on latest Nightly 70.0a1 (2019-07-24). Tests were performed under WIndows 10 (x64), Ubuntu 18.04 (x64) and macOS 10.14.

Comment on attachment 9080079 [details]
Bug 1567105 - When cloning a document for printing, call SetCompatMode rather than silently copying over the compat mode. r=heycam,#style,jwatt

Fixes a printing regression in the Outlook web app. Verified on Nightly and includes automated tests. Approved for 69.0b8 and 68.1esr.

Attachment #9080079 - Flags: approval-mozilla-esr68?
Attachment #9080079 - Flags: approval-mozilla-esr68+
Attachment #9080079 - Flags: approval-mozilla-beta?
Attachment #9080079 - Flags: approval-mozilla-beta+
Attachment #9080080 - Flags: approval-mozilla-esr68?
Attachment #9080080 - Flags: approval-mozilla-esr68+
Attachment #9080080 - Flags: approval-mozilla-beta?
Attachment #9080080 - Flags: approval-mozilla-beta+

Mind uplifting this version instead? The function lives in nsHTMLDocument in ESR.

Flags: needinfo?(emilio) → needinfo?(aryx.bugmail)

The issue is no longer reproducible on Firefox 69.0b8 (20190724202328 from Treeherder). Tests were performed under Windows 10 (x64), Ubuntu 18.04 (x64) and macOS 10.14.

Flags: needinfo?(aryx.bugmail)

The issue is verified on Firefox 68.1.0esr (20190725195252 from Treeherder). Tests were performed under Windows 10 (x64), Ubuntu 18.04 (x64) and macOS 10.14.

Status: RESOLVED → VERIFIED
Flags: qe-verify+

Backed out changeset ed2ee021980b (Bug 1567105) for test_printpreview.xul failures

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-esr68&fromchange=ed2ee021980b0da59bd9cf03c83946ff844feb5e&tochange=59b5294b8c047097b4575d3c5de86a2f1530d3aa&selectedJob=258327750&searchStr=linux%2Cx64%2Cshippable%2Copt%2Cmochitests%2Cwithout%2Ce10s%2Ctest-linux64-shippable%2Fopt-mochitest-chrome-1proc-3%2Cm-1proc%28c3%29

Backout link: https://hg.mozilla.org/releases/mozilla-esr68/rev/59b5294b8c047097b4575d3c5de86a2f1530d3aa

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=258327750&repo=mozilla-esr68&lineNumber=1869

[task 2019-07-25T16:05:56.775Z] 16:05:56 INFO - TEST-START | layout/base/tests/chrome/test_printpreview.xul
[task 2019-07-25T16:05:56.941Z] 16:05:56 INFO - GECKO(1200) | JavaScript error: chrome://mochitests/content/chrome/layout/base/tests/chrome/printpreview_helper.xul, line 126: ReferenceError: counterTimeout is not defined
[task 2019-07-25T16:06:02.749Z] 16:06:02 INFO - GECKO(1200) | JavaScript error: chrome://mochitests/content/chrome/layout/base/tests/chrome/printpreview_helper.xul, line 399: ReferenceError: frameElts is not defined
[task 2019-07-25T16:11:19.468Z] 16:11:19 INFO - TEST-INFO | started process screentopng
[task 2019-07-25T16:11:19.747Z] 16:11:19 INFO - TEST-INFO | screentopng: exit 0
[task 2019-07-25T16:11:19.748Z] 16:11:19 INFO - <snipped 41 output lines - if you need more context, please use SimpleTest.requestCompleteLog() in your test>
[task 2019-07-25T16:11:19.749Z] 16:11:19 INFO - Buffered messages logged at 16:05:59
[task 2019-07-25T16:11:19.751Z] 16:11:19 INFO - TEST-PASS | layout/base/tests/chrome/test_printpreview.xul | Should have called afterprint listener!
....
[task 2019-07-25T16:11:19.849Z] 16:11:19 INFO - TEST-PASS | layout/base/tests/chrome/test_printpreview.xul | Should have called beforeprint listener!
[task 2019-07-25T16:11:19.850Z] 16:11:19 INFO - TEST-PASS | layout/base/tests/chrome/test_printpreview.xul | Should have called afterprint listener!
[task 2019-07-25T16:11:19.852Z] 16:11:19 INFO - Buffered messages finished
[task 2019-07-25T16:11:19.860Z] 16:11:19 INFO - TEST-UNEXPECTED-FAIL | layout/base/tests/chrome/test_printpreview.xul | Test timed out.
[task 2019-07-25T16:11:19.860Z] 16:11:19 INFO - SimpleTest.ok@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:275:18
[task 2019-07-25T16:11:19.862Z] 16:11:19 INFO - reportError@chrome://mochikit/content/tests/SimpleTest/TestRunner.js:121:22
[task 2019-07-25T16:11:19.862Z] 16:11:19 INFO - TestRunner._checkForHangs@chrome://mochikit/content/tests/SimpleTest/TestRunner.js:142:7
[task 2019-07-25T16:11:20.467Z] 16:11:20 INFO - GECKO(1200) | MEMORY STAT | vsize 3122MB | residentFast 310MB | heapAllocated 101MB
[task 2019-07-25T16:11:20.468Z] 16:11:20 INFO - TEST-OK | layout/base/tests/chrome/test_printpreview.xul | took 323698ms

Flags: needinfo?(emilio)

The test is timing out in ESR, but I think we should leave the fix there.

Flags: needinfo?(emilio)

Comment on attachment 9080080 [details]
Bug 1567105 - Tests. r=heycam,#style,jwatt

Sounds like we're leaving the test for 69+ only.

Attachment #9080080 - Flags: approval-mozilla-release?
Attachment #9080080 - Flags: approval-mozilla-esr68+
Comment on attachment 9080440 [details] [diff] [review]
Rebased version of the first patch for esr.

Fixes a regression in 68 causing broken printing from the Outlook web app. Verified on Beta with no known issues caused by this patch. Approved for 68.0.2 & 68.0.2esr.
Attachment #9080440 - Flags: approval-mozilla-release+
Attachment #9080440 - Flags: approval-mozilla-esr68+
Attachment #9080079 - Flags: approval-mozilla-release?
Attachment #9080079 - Flags: approval-mozilla-esr68+

Added to the 68.0.2 relnotes:

Printing emails from the Outlook web app no longer prints only the header and footer

The issue is no longer reproducible on Firefox 68.0.2 (20190802130755 from Treeherder) and 68.1.0esr (20190806222858 from Treeherder). Tests were performed under Windows 10 (x64), Ubuntu 18.04 (x64) and macOS 10.13.

You need to log in before you can comment on or make changes to this bug.