Closed Bug 1538688 Opened 6 years ago Closed 5 years ago

Calendar print preview broken after bug 1536517: Shows "raw" HTML instead of rendering it

Categories

(Calendar :: Dialogs, defect)

Lightning 6.9
Desktop
Windows 10
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: jorgk-bmo, Unassigned)

References

Details

(Keywords: regression)

+++ This bug was initially created as a clone of Bug #1536517 +++

I mentioned that in bug 1536517 comment #6. You can see the malfunction in attachment 9053128 [details] of that bug.

I didn't realise that adding the missing JS and CSS caused this problem. Backing out https://hg.mozilla.org/comm-central/rev/fe82189269f7 fixes the issue, but then the datetime pickers are missing again :-(

So something in those included scripts messes up the preview in the iframe.

Flags: needinfo?(mkmelin+mozilla)
Flags: needinfo?(geoff)

The customElements.js includes shouldn't be there. But there's something wrong with CalendarDatePicker. What's shown in the print preview window is the data: uri for the html of what should be shown, but beneath that there is also the correct looking html (looking like it should).

Magnus, thanks for looking. I copied https://hg.mozilla.org/comm-central/rev/6716eb6db611#l1.12 where customElements.js is also included, maybe it was necessary for the attendees? Removing it from the print dialogue doesn't fix anything, removing datetimepickers.js does :-(

Yes that only gets rid of a redeclaration error (which happens to be harmless in this case I think).
Including customElements.js should normally not be needed, and certainly only needed in case you need an element from there.

I found the error though:
Strange as it may look, this is the culprit: https://searchfox.org/comm-central/rev/b861a92a529f2820db0078a3ace7643f3c80ba59/calendar/resources/content/datetimepickers/datetimepickers.js#794-796

I don't understand why yet. Removing those lines gets rid of the problem

Flags: needinfo?(mkmelin+mozilla)

Thanks again for looking. I'll leave it to Geoff, he can also remove the unneeded customElements.js that he added in the first place ;-)

I can't reproduce this.

And it seems you don't need customElements.js (actually mailWidgets.js) in the print dialog but you do in the others. Go figure.

Flags: needinfo?(geoff)

I've tried on various profiles now after Geoff insisted on IRC that he can't reproduce it. Now I can't reproduce it either.

I'll take out the unnecessary customElements.js in the bug where I added them.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME

I'm seeing this with my regular profile on 67b1. Any additional data I could collect? Strangely enough viewing today from day view works every time but everything else does not initially. When I choose any of the three radio options it starts working again, but initially two are selected at once like on the example image.

Hmm, I'm not a Calendar specialist. Can you give the exact steps to reproduce the problem.

Also worth checking trunk, since we don't know why it went away in the first place.

Today's Daily with new profile before creating any events

  1. open calendar
  2. press Ctrl+P
    and it's broken. No special steps, possibly related to either platform or timing somehow? Build is en-US 64bit on Linux. No errors in console when this happens.

Trying different days sometimes broken view flashes shortly before I get empty preview as it should be without events. When this happens two radio options remain selected.

I see this too on trunk now. Back to figuring out comment 3 then.

Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---

Works for me using Thunderbird 68.0b1 (Build ID 20190611100625) with built-in Lightning 7.0 on Windows 10.
I do see the two radio options being selected (current view + custom date range) but no problem with raw HTML.

(In reply to Stefan Sitter [:ssitter] from comment #12)

Works for me using Thunderbird 68.0b1 (Build ID 20190611100625) with built-in Lightning 7.0 on Windows 10.
I do see the two radio options being selected (current view + custom date range) but no problem with raw HTML.

Works for me using Thunderbird 68.7.0 with built-in Lightning 68.7.0.

I don't see two radio options.

Can be resolved as WFM?

Flags: needinfo?(mkmelin+mozilla)

Yeah I think we can close this now.

Status: REOPENED → RESOLVED
Closed: 6 years ago5 years ago
Flags: needinfo?(mkmelin+mozilla)
Resolution: --- → WORKSFORME

This issue has been present in release Lightning (Win-10) for at least last 6 months (August 2020-present [January 2021]), including the current v. 78.6.1 (32-bit).
It might be fixed in test releases (see bug#1659363 where HTML rendering is reportedly enabled for the event description), but not in 78.

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