Last Comment Bug 547543 - news added twice and cannot be removed
: news added twice and cannot be removed
Status: RESOLVED FIXED
:
Product: MailNews Core
Classification: Components
Component: Feed Reader (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: Thunderbird 13.0
Assigned To: alta88
:
Mentors:
: 316051 431822 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-21 04:48 PST by Christian R
Modified: 2012-03-08 15:23 PST (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch (3.23 KB, patch)
2012-03-08 07:42 PST, alta88
mozilla: review+
Details | Diff | Review

Description Christian R 2010-02-21 04:48:54 PST
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2) Gecko/20100214 Gentoo Firefox/3.6
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100214 Thunderbird/3.0.1

This rss http://support.asus.de/rss/RssFeeds.aspx?product=1&model=M4A79XTD%20EVO&SLanguage=en-us will be added twice, so I have two folders "ASUSTek RSS [Motherboard] [M4A79XTD EVO] [en-us]82439776" with the same name.
I'm not able to delete both at all.
It will be back after restart if I remove one and rename the other and then remove it as well.
Sometimes I even cannot rename the folder.
So I hope you're able to reproduce it.

Reproducible: Always

Steps to Reproduce:
1. Add http://support.asus.de/rss/RssFeeds.aspx?product=1&model=M4A79XTD%20EVO&SLanguage=en-us as news feed
2. See two new news folders with the same name (if not restart tb)
3. Try to delete one or even both
Actual Results:  
It adds folders with the same name twice.
You're not able to delete one or even both of them.

Expected Results:  
Only one folder should be added.
I should be able to remove it as well.
Comment 1 Ludovic Hirlimann [:Usul] 2010-02-22 05:43:38 PST
I can't reproduce the dual folder issue with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.2pre) Gecko/20100221 Lanikai/3.1b1pre.

Have you tried safe mode? (see https://support.mozillamessaging.com/en-US/kb/Safe+Mode for more information)
Comment 2 Ludovic Hirlimann [:Usul] 2010-02-22 07:37:41 PST
It does appear twice after a restart of Thunderbird.
Comment 3 Christian R 2010-02-22 07:41:41 PST
Even in safe-mode I'm only able to delete both feeds but only one of these folders.
When trying to remove the second folder I just get "A folder with that name already exists. Please enter a different name.".. but even that doesn't work as expected.
Comment 4 Ludovic Hirlimann [:Usul] 2010-02-23 01:29:04 PST
My could you look into this one ?
Comment 5 Ludovic Hirlimann [:Usul] 2010-04-20 05:44:29 PDT
(In reply to comment #4)
> My could you look into this one ?

Myk would you have bandwidth to look into this one ?
Comment 6 Myk Melez [:myk] [@mykmelez] 2010-04-25 22:59:39 PDT
I don't have too much bandwidth, but I took a look this evening, and I found that subscribing to the feed creates three files in the Mail/News & Blogs/ subdirectory of the profile directory:

  ASUSTek RSS [Motherboard] [M4A79XTD EVO] [en-us]82439776
  ASUSTek RSS [Motherboard] [M4A79XTD EVO] [en-usd77a79f2
  ASUSTek RSS [Motherboard] [M4A79XTD EVO] [en-usd77a79f2.msf

The feeds.rdf file specifies the fz:destFolder for the feed as:

  <fz:destFolder RDF:resource="mailbox://nobody@News%20%26%20Blogs/ASUSTek%20RSS%20%5BMotherboard%5D%20%5BM4A79XTD%20EVO%5D%20%5Ben-us%5D82439776"/>

However, the file ending in "d77a79f2" is the one to which feed messages have been added (and the one being indexed via a Mork database).  I suspect that some code creates the file ending in "82439776" when one subscribes to the feed, then some other code creates "d77a79f2" when it downloads feed messages.

I haven't been able to figure out where those respective code chunks live, however.
Comment 7 Ludovic Hirlimann [:Usul] 2010-04-27 10:58:21 PDT
Thanks for the analysis.
Comment 8 Magnus Melin 2010-05-09 11:38:57 PDT
What produces them should be NS_MsgHashIfNecessary - http://mxr.mozilla.org/comm-central/source/mailnews/base/util/nsMsgUtils.cpp#99 - but i doubt that helps much.
Comment 9 alta88 2012-03-06 16:29:48 PST
the reason is that the feed title ends in empty space.  feeditem titles that end in empty space also cause trouble if just the right length.  trim() is a friend here..
Comment 10 alta88 2012-03-08 07:42:20 PST
Created attachment 604065 [details] [diff] [review]
patch
Comment 11 David :Bienvenu 2012-03-08 07:59:09 PST
Comment on attachment 604065 [details] [diff] [review]
patch

looks safe and reasonable. thx for the patch.
Comment 12 alta88 2012-03-08 08:27:57 PST
*** Bug 316051 has been marked as a duplicate of this bug. ***
Comment 13 alta88 2012-03-08 08:37:46 PST
*** Bug 431822 has been marked as a duplicate of this bug. ***
Comment 14 Ryan VanderMeulen [:RyanVM] 2012-03-08 15:23:39 PST
http://hg.mozilla.org/comm-central/rev/4c3e576941e8

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