Closed Bug 1265126 Opened 4 years ago Closed 4 years ago

Thunderbird 45.0: Printing of composition window not working

Categories

(Thunderbird :: Message Compose Window, defect)

45 Branch
defect
Not set

Tracking

(thunderbird46 wontfix, thunderbird47 fixed, thunderbird48 fixed, thunderbird_esr4546+ fixed)

RESOLVED FIXED
Thunderbird 48.0
Tracking Status
thunderbird46 --- wontfix
thunderbird47 --- fixed
thunderbird48 --- fixed
thunderbird_esr45 46+ fixed

People

(Reporter: regner, Assigned: aceman)

References

()

Details

(Keywords: regression, Whiteboard: [regression:TB42])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Build ID: 20160407164938

Steps to reproduce:

Selected email message to edit.  Tried to print the document from edit mode (to avoid printing headers with the document).   Also tried to print document from Forward mode.

Note that the document content loads and prints normally from draft mode when the message has been saved as a draft.


Actual results:

TB did not load message content for printing in EDit or Forward mode.  Document did not print.


Expected results:

Document should have printed from Edit or Forward mode without headers.
Summary: Thunderbird 45.0 does not load message content for printing when message is in edit mode → Thunderbird 45.0 does not load message content for printing when message is in Edit or Forward mode
Hmm, "Print Preview" works, but "Print" doesn't. However, the "Print" button on the "Print Preview" works.

"Print" worked in TB 38, so this is a regression.

Alice, you do regressions on Thunderbird as well? If so, can you help here, please.
Summary of the problem: Open composition window, print. Nothing happens.
Status: UNCONFIRMED → NEW
Component: Untriaged → Message Compose Window
Ever confirmed: true
Flags: needinfo?(alice0775)
Summary: Thunderbird 45.0 does not load message content for printing when message is in Edit or Forward mode → Thunderbird 45.0: Printing of composition window not working
Alice, thank you so much for this. I'm amazed every time!!

I can't see anything in the C-C push, in M-C it could be bug 1146454.
(please include me or someone involved in QA/support on regressions. thx)

do we need bug 1195863?
Good catch. Looks like it. Seems like an easy port.
(In reply to Wayne Mery (:wsmwk, use Needinfo for questions) from comment #4)
> (please include me or someone involved in QA/support on regressions. thx)
> 
> do we need bug 1195863?

Yes, good hint. The print code SM has replaced still exists in TB compose.
I can try that.
Thank you sir, you're a scholar and a gentleman ;-)
I can see this error in the console:
#PRINT ERROR: ReferenceError: gBrowser is not defined
And no print window opens.
Attached patch patchSplinter Review
This fixes printing for me on Linux, in the compose window and e.g. on the Help->troubleshooting info tab.
Assignee: nobody → acelists
Status: NEW → ASSIGNED
Attachment #8742074 - Flags: review?(mozilla)
Comment on attachment 8742074 [details] [diff] [review]
patch

Review of attachment 8742074 [details] [diff] [review]:
-----------------------------------------------------------------

Very good. Just one question: Have you checked all the other bits and pieces they did in bug 1195863?
Ah well, I checked, and I suppose we don't have navigatorOverlay.xul and nsContextMenu.js.
I suppose you covered all other usages of PrintUtils in TB, right?
I'll approve Aurora straight away.
I'm a bit annoyed that our SM friend didn't tell us about this and let us ship something broken.
Attachment #8742074 - Flags: review?(mozilla)
Attachment #8742074 - Flags: review+
Attachment #8742074 - Flags: approval-comm-aurora+
OS: Unspecified → All
Hardware: Unspecified → All
I replaced all instances of PrintUtils.print() that I found.
I have a very similar patch sitting in my local patch queue from 19th August 2015. I started a new job on 20th August, so unfortunately it slipped off my radar. Sorry.
https://hg.mozilla.org/comm-central/rev/063b70df9e01
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 48.0
Blocks: 1146454
Flags: in-moztrap?
Whiteboard: [regression:TB42]
Are we going to patch V45?
(In reply to Matt from comment #15)
> Are we going to patch V45?

Probably (for 45.1) but it has not landed yet.
I've been having a similar issue where printing does not work at all.  This is on TB 45.0 under Windows 10 Pro.

I click on File -> Print (or Ctrl-P) and get the popup window saying its loading content for printing.  That window used to only be there for a second or two, but it now stays there for about 10-15 seconds.  After that I get the "An Error Occurred While Printing" window.  Been through all known troubleshooting steps and have threads going in support.mozilla.org and forums.mozillazine.org.

Subscribing to this bug to see when it gets to a release.  Hopefully this fix works for me also.
http://ftp.mozilla.org/pub/thunderbird/nightly/latest-comm-central/thunderbird-48.0a1.en-US.win32.installer.exe
Only the 48 version has the fix.
Install it into a different directory, well, it offers "Daily", so that's OK. And run it on a different profile to not mess up your existing profile. "thunderbird -p" does this. You can modify the desktop shortcut accordingly.
Loaded that daily, created a new profile, entered the info for one of my POP3 accounts, downloaded some messages and tried to print.  Still not printing, but at least I no longer get the "An Error Occurred While Printing" error.  

Other than that error, the behavior is the same.  It prepares the document, presents me with the printer selection window, then after selecting the printer, I see the percentage completion window.  Everything looks normal, but nothing ever prints.  I even tried going to Print Preview, which looks normal, but when I hit the Print button, it behaves exactly the same.

The strangest part of this (and this is the same behavior as I'm seeing in 45.0) is that once its finished with all the popups and it should be printing, I get the printer icon in my system tray.  When I hover over it, it says "0 document(s) pending for John".  After about a minute or two, that icon goes away.

Please let me know if there is anything else I can do to help debug this!

BTW, here are the two threads where some very helpful people have tried to get this resolved and all the steps I've been through:
https://support.mozilla.org/questions/1118591
http://forums.mozillazine.org/viewtopic.php?f=39&t=3000383

Thank You!
(In reply to John Schneider from comment #21)
> Other than that error, the behavior is the same.  It prepares the document,
> presents me with the printer selection window, then after selecting the
> printer, I see the percentage completion window.  Everything looks normal,
> but nothing ever prints.  I even tried going to Print Preview, which looks
> normal, but when I hit the Print button, it behaves exactly the same.

> Please let me know if there is anything else I can do to help debug this!

The first thing that helps is to understand how it all hangs together.

TB is using underlying Mozilla core technology (which is also used in Firefox) for a lot of things it does, printing being one of them.

There was an issue with the TB print function not using the correct interface with the Mozilla core technology and this has now been corrected and will be shipped in TB 45.1.

The other thing is to understand how printing works. No application software (like TB or FF) talks directly to the printer. All application software talks to the Windows printing subsystem, see for example:
http://www.brianmadden.com/blogs/terminal_services_for_microsoft_windows_server_2003_advanced_technical_design_guide/pages/how-windows-printing-works.aspx

So the print job is handed to Windows and that does its thing, or not, as in your case. You're saying that you see the print window, select the printer, click "OK" and even see the progress in percent, but nothing prints. Well, sadly, that is outside reach of the TB software.

Have you tried using FF 45 and printing something? That should use the same Mozilla core component. If FF prints, then TB Daily should print. If FF 45 doesn't print for you, we need to raise it with the FF team.
hi Jorg
According to the link supplied in comment 21: https://support.mozilla.org/en-US/questions/1118591?
the person says they have the same issue with FF.
'Printing works fine for all other apps (except Firefox 45.0.2 which gives the same error).'
OK, great, thanks for confirming my speculation.
Why doesn't anyone open a bug in Core::Printing:Output to describe the problem in FF 45.

This bug here is fixed. We fixed the interface problem between Thunderbird and Mozilla core, so now Thunderbird is in the same boat as Firefox and the Mozilla core people have to fix it for everyone.

Besides, if a TB user complains, Mozilla core people are not interested. If a FF user complains, they will look into it.
Should I open the bug for Core::Printing:Output myself?

BTW, I booted into to my previous Windows 7 Ultimate x64 environment which is running TB 38.7.1, tried printing an email, and it worked fine.  I then upgraded TB to v45 and was still able to print an email without any issues.  

Given that scenario, it would appear to be an issue with Mozilla core and Windows 10.  Would you guys agree with that assumption?
(In reply to John Schneider from comment #25)
> Should I open the bug for Core::Printing:Output myself?
Yes. Make the summary: Can't print on Windows 10 using Firefox 45.
And describe what's happening, so what you've said in comment #21. Please post the bug number here.

> Given that scenario, it would appear to be an issue with Mozilla core and
> Windows 10.  Would you guys agree with that assumption?
Yes.

===

P.S.: Printing in TB45 was only broken for the compose window. So that's why you could print a received message using TB 45 on Win 7.
You may want to checkout this Bug 1254980 - Copy-pasting selected HTML from Firefox to a new Thunderbird message (using TB 38) or to BlueGriffon is broken as of Firefox 45 for similar core issues:
https://bugzilla.mozilla.org/show_bug.cgi?id=1254980.
Why would that have anything to do with it? No, it has nothing to do with it. That bug was about pasting from FF 45 to TB 38. The bug is resolved in FF 45.0.2.

(I'm restricting access to this bug to avoid further comments. This bug here is *only* about not being able to print the TB composition window, nothing else. This bug is fixed and the fix will ship with TB 45.1).
Restrict Comments: true
Attachment #8742074 - Flags: approval-comm-esr45+
Duplicate of this bug: 1266770
Duplicate of this bug: 1267979
Duplicate of this bug: 1260666
Duplicate of this bug: 1268060
Duplicate of this bug: 1268052
Duplicate of this bug: 1268785
Duplicate of this bug: 1270058
You need to log in before you can comment on or make changes to this bug.