Closed Bug 128297 (newssource) Opened 23 years ago Closed 17 years ago

news: source not available while reading messages offline

Categories

(SeaMonkey :: MailNews: Backend, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: neaya, Assigned: markushossner)

References

Details

Attachments

(1 file, 1 obsolete file)

From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; VNIE5 RefIE5; 
Q312461; Hotbar 3.0)
BuildID:    20020204

I tried different times to view the sources a newsgroup message
while offline, it appears a window with no content, trying to 
view the source that window appears the following :

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 
Transitional//EN"><html><head><title></title></head><body></body></html>

The message itself has actual content......



Reproducible: Always
Steps to Reproduce:
1. mark the newsgroup for offline use
2. download the newsgroup (from the same window..)
3. go 'offline'
4. read any message in the newsgroup

Actual Results:  Empty window

Expected Results:  Full text in RFC822 format of the message
Confirmed.

Using 2002022703 on NT 4.0 and
2002022808 on linux 2.2.

If you download a news article and go offline.

If you do a Ctrl-U aka View Mesg source: the window will
be blank. If you right click on the window and select view page
source: you will see the html tags the reporter said.

Works fine for mail. Mesg source brings up the source of the mesg
and view page source works as expected.

When online, view mesg or page source for news mesg (downloaded/non-downloaded)
works as expected.

Marking as new and addine news to the subj line.


Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: source not available while reading messages offline → news: source not available while reading messages offline
This probably has the same cause as bug 108107
"offline: news: can't save/open attachments in mesgs that have been downloaded
while offline"
Not sure if this is related, but in BuildID 2002032603 I always get an empty
window if I try to "view source" of a message in IMAP folder (in online mode),
but news and local folders are OK.
Aleksey, the problems are not related; could you try today's build for view |
source in imap?
With 2002032721, view source still not working (is does work for INBOX, but not
subfolders). I have filed bug 133899 on that.
As I just mentioned in bug 133899, the IMAP problem is caused by "View Message
Source" just not knowing what URI to display. The "View Page Info" on the
"Message Source" window reveals that it is just displaying "about:blank", but if
I construct an appropriate imap://... URI manually, it works.
*** Bug 136882 has been marked as a duplicate of this bug. ***
Same for me with Win 95 OSR2

Mozilla 0.9.9+
Mozilla/5.0 (Windows; U; Win95; en-US; rv:0.9.9+) Gecko/20020405
Same for me with Win 95 OSR2

Mozilla 0.9.9+
Mozilla/5.0 (Windows; U; Win95; en-US; rv:0.9.9+) Gecko/20020405
I have noticed, with a message that had been sent in HTML mode, that in this
case the display is OK even off-line.
*** Bug 170273 has been marked as a duplicate of this bug. ***
Should this bug be added to tracking bug 176238 ?
Even when online, view message source doesn't work as expected. You'll get the
message source displayed, but only if you're really connected to the network.

If not, you won't see the source even for downloaded messages, whether "work
offline" is set or not.

Mozilla does never access the file holding the downloaded messages when viewing
the source. It only displays the source instantly without network activity if
the source has been cached because you viewed it recently.
Blocks: 176238
No longer blocks: 176238
This also occurs when trying to view the source of a downloaded message,
which as expired on the server.

In this case it even replaces the normal message view this the standard message
expired screen, till you select another mail, then return to the downloaded mail!
Product: Browser → Seamonkey
*** Bug 248483 has been marked as a duplicate of this bug. ***
Alias: newssource
OS: Windows 98 → All
This should be part of a Core Component, actually, because it also affects
Thunderbird, but I'm not sure if it's Core:MailNews:Networking or
Core:Networking:News or something else... :(
offline should be a core component, probably.
*** Bug 295784 has been marked as a duplicate of this bug. ***
(In reply to comment #18)

The same thing I witnessed on Mozilla 1.7.10 (Windows)
: When you are offiline, you cannot view Newsgroup message source.
It should be easy to fix it.

> The same thing I witnessed on Mozilla 1.7.10 (Windows)
> : When you are offiline, you cannot view Newsgroup message source.
> It should be easy to fix it.

Oh, good, where's your patch? We've waited long enough for it!

(Hint: It isn't, else someone would have made it yet!)
[Sorry for spamming. :(]
> Oh, good, where's your patch? We've waited long enough for it!
> 
> (Hint: It isn't, else someone would have made it yet!)

You have a point. :) Sorry for been so impationed.
I am not reely a developer here.
Thank you for your answer. Hope I could help bu any meens.
Still happens on Seamonkey 1.0.4

You cannot see news message source when you are online.
There is still a Problem with displaying news messages source
when Seamonkey 1.1 is in _offline_ mode.
(mistake in previous post it is when reader is offline)
Blocks: socmn
Attached patch Patch (obsolete) — Splinter Review
To get a newsgroup message from the local cache (disk) the message folder and the message key is needed but view source only gets a message url with the host and the message id (news://host/message-id).

1. The patch changes the news message url to news://host/message-id?group=mozilla.announce&key=15. So that view source gets all information needed to read from the local cache.

2. Before trying to open a new connection to the news server the new news url is parsed to get the folder and the key.

3. Folder and key are used to check if the message exists in the local cache.

4. If so the message is loaded from the local cache instead of trying to open a new connection.

(With this patch news messages existing in the local cache are always (offline/online) loaded from the local cache instead of reloading them from the server.)
Attachment #271464 - Flags: superreview?(bienvenu)
Attachment #271464 - Flags: review?(neil)
QA Contact: grylchan → offline
Assignee: bienvenu → markushossner
Great, I'll try the patch out.

I think your editor changed this, and I think it shouldn't :

- *   Håkan Waara <hwaara@chello.se>
+ *   HÃ¥kan Waara <hwaara@chello.se>
Comment on attachment 271464 [details] [diff] [review]
Patch

this works for me, and looks good. Thx!
Attachment #271464 - Flags: superreview?(bienvenu) → superreview+
Attached patch Patch 2Splinter Review
> I think your editor changed this, and I think it shouldn't :
> 
> - *   Håkan Waara <hwaara@chello.se>
> + *   HÃ¥kan Waara <hwaara@chello.se>

Sorry, Håkan. Changed!
Attachment #271464 - Attachment is obsolete: true
Attachment #271582 - Flags: superreview?(bienvenu)
Attachment #271582 - Flags: review?(neil)
Attachment #271464 - Flags: review?(neil)
Attachment #271582 - Flags: superreview?(bienvenu) → superreview+
Comment on attachment 271582 [details] [diff] [review]
Patch 2

>+  // parse url to get the msg folder and check if the message is in the folder's 
>+  // local cache before opening a new socket and trying to download the message
>+  rv = ParseURL(m_url, getter_Copies(group), &m_messageID, getter_Copies(commandSpecificData));
The rest of the patch looks OK, but I was wondering where you use the msg folder, or otherwise explain why it is necessary to move this? Thanks.
(In reply to comment #28)
> (From update of attachment 271582 [details] [diff] [review])
> >+  // parse url to get the msg folder and check if the message is in the folder's 
> >+  // local cache before opening a new socket and trying to download the message
> >+  rv = ParseURL(m_url, getter_Copies(group), &m_messageID, getter_Copies(commandSpecificData));
> The rest of the patch looks OK, but I was wondering where you use the msg
> folder, or otherwise explain why it is necessary to move this?


The folder is used in ParseURL to check if the message is in the local cache:
   ...
  folder->HasMsgOffline(m_key, &useLocalCache);
  ...
  rv = newsURL->SetMsgIsInLocalCache(useLocalCache);
  ....
  
The parsing has to be done at this point in nsNNTPProtocol::Initialize cause some lines later is checked if the url is in the local cache:
 ...
 mailnewsUrl->GetMsgIsInLocalCache(&msgIsInLocalCache);
 ...
 
If not a new socket is opened to try downloading the message from the server.

Coming from the messenger SetMsgIsInLocalCache is already done but view source could not do this cause it does not have the msg folder.
Comment on attachment 271582 [details] [diff] [review]
Patch 2

Ah yes, that makes sense, thanks.
Attachment #271582 - Flags: review?(neil) → review+
Keywords: checkin-needed
Landed on trunk.
Status: NEW → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
This bug is still in Thunderbird 2.0.0.6.
(In reply to comment #32)
> This bug is still in Thunderbird 2.0.0.6.

This bug is fixed in trunk (Thunderbird 3.0 actually). No fix in branch (Thunderbird 2.0.0.x).

Okay, but the bug is also not fixed in Seamonkey 1.1.2. What version of Seamonkey, if any, contains the fix?
As a trunk fix, it will be part of the upcoming SeaMonkey 2 and Thunderbird 3 releases. It is not likely to be ported to the branch.
Blocks: 404389
Depends on: 389038
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: