Closed Bug 1828331 Opened 1 year ago Closed 1 year ago

The "Article not found" error page is not shown for "Remove All Expired Articles" (this._msgWindow is undefined)

Categories

(MailNews Core :: Networking: NNTP, defect, P3)

Thunderbird 112

Tracking

(thunderbird_esr102 unaffected)

VERIFIED FIXED
114 Branch
Tracking Status
thunderbird_esr102 --- unaffected

People

(Reporter: infofrommozilla, Assigned: mkmelin)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression, Whiteboard: [Supernova3p])

Attachments

(3 files, 1 obsolete file)

If an article is no longer available on the server, the "Article not found" error page should be displayed.
In the TB113.0b1 I only get an empty window.

Keywords: regression
Regressed by: 1799764

The "Article not found" page should be created here:
https://searchfox.org/comm-central/source/mailnews/news/src/NntpClient.jsm#192

          if (this._msgWindow && this._articleNumber) {

but this._msgWindow is undefined.

And this is because in Bug 1799764 the [top.]msgWindow parameter for messageService.DisplayMessage( was replaced by null:
https://phabricator.services.mozilla.com/D161656

https://searchfox.org/comm-central/source/mail/base/content/aboutMessage.js#193

    messageService.DisplayMessage(uri, browser.docShell, null, null, null, {});

This is then passed on, up to the this._msgWindow above.

Thanks Alfred for detailed analysis!

Blocks: tb-new-3pane
Severity: -- → S3
Priority: -- → P2
Summary: The "Article not found" error page is not shown for "Remove All Expired Articles" → The "Article not found" error page is not shown for "Remove All Expired Articles" (this._msgWindow is undefined)
Whiteboard: [supernova]

Rename DisplayMessage to loadMessage + remove unused outUrl. This is a more appropriate name as it's strictly not just about displaying, but used for e.g. copying too.
OutUrl was passed around to CopyMessage.

Rename CopyMessage to copyMessage and remove unused outUrl.

Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED

Alfred, are you able to test the patches? I'm not sure where to find an expired article.

Flags: needinfo?(infofrommozilla)

D176129 unfortunately not. I do not have a working build environment.

D176130: Just reinserting top.msgWindow does not work. TB throws an exception:

mailnews.nntp: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMsgWindow.displayURIInMessagePane]
    _onData resource:///modules/NntpClient.jsm:209
NntpClient.jsm:216:28
    _onData resource:///modules/NntpClient.jsm:216

https://searchfox.org/comm-central/source/mailnews/news/src/NntpClient.jsm#209

              this._msgWindow.displayURIInMessagePane(
Flags: needinfo?(infofrommozilla)

We can try it, but we're equally unsure where to find expired articles. Don't they happen when some articles are removed a while after initially downloading a newsgroup? So on a new profile with newly setup newsgroups there wouldn't be any? That said, we've found some on an existing profile in a.c.s.thunderbird.

The easiest way is to create one yourself. For this you need a 2nd TB ("TB-b").

  1. post an article to a test group with "TB-b".
  2. with "TB-a" subscribe and update the group without viewing the article. Otherwise it will be cached.
  3. cancel the article with "TB-b": Menu -> Message -> Cancel Message
  4. show the article with "TB-a"...

With both patches applied, we see what Alfred posted in comment #6. this._msgWindow.displayURIInMessagePane() tries to display this URI about:newserror?r=No such article number 6070&m=9cf564d2-f3e5-4f74-abf7-67b8affd96b0n%40googlegroups.com&k=6070&f=news://news.eternal-september.org/alt.de.test and fails.

A bit of debugging showed that DisplayURIInMessagePane() fails in GetMessageWindowDocShell():
https://searchfox.org/comm-central/rev/04176849c949facaabc16deb07dd2e42b81b5173/mailnews/base/src/nsMsgWindow.cpp#73
likely due to some Supernova changes.

Right, this should apparently be handled some other way now. See https://searchfox.org/comm-central/rev/04176849c949facaabc16deb07dd2e42b81b5173/mail/base/content/aboutMessage.js#193
This is the last use of DisplayURIInMessagePane/DisplayHTMLInMessagePane

The now failing GetMessageWindowDocShell() is still called in a few places:
https://searchfox.org/comm-central/search?q=GetMessageWindowDocShell&path=&case=false&regexp=false
Also note bug 1758743 in this context.

Updating whiteboard to [supernova3p]. 20230424_2303

Whiteboard: [supernova] → [Supernova3p]
Priority: P2 → P3
Target Milestone: --- → 114 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/ac54a319662f
Some refactoring of nsIMsgMessageService. r=benc

See Also: → 1804351
See Also: → 1830468
Attachment #9329665 - Attachment is obsolete: true

After D176753, displayURIInMessagePane() and its remaining last other unused caller displayHTMLInMessagePane() can be removed.

Yeah, planning to do that.

See Also: → 1830600

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/7a3924d978a4
Fix showing "Article not found" error page for expired nntp articles. r=aleca

Pushed by john@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/e2b52692b39f
Remove unused msgWindow.displayURIInMessagePane/displayHTMLInMessagePane. r=BenC

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: