Bug 3603

Summary: Feeds from Reddit are empty
Product: Claws Mail (GTK 2) Reporter: greencoppermine
Component: Plugins/RSSylAssignee: users
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 3.11.1   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Screenshot of feeds being empty none

Description greencoppermine 2016-01-27 14:22:07 UTC
Created attachment 1626 [details]
Screenshot of feeds being empty

I normally read all my RSS/Atom feeds using Claws-mail with RSSyl. This morning all the feeds from Reddit became blank and refreshing the feeds doesn't help.

The Reddit feed still works well in Firefox.

An example feed is:

https://www.reddit.com/r/linux.rss

Viewing this in say Firefox works perfectly, but adding this feed to Claws-mail makes the feed turn up empty, like it doesn't contain any posts.

I then ran a strace and found this:

openat(AT_FDCWD, "/home/foo/.claws-mail/RSSyl/My Feeds (RSSyl)//Reddit Linux", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 16
getdents(16, /* 4 entries */, 32768)    = 112
getdents(16, /* 0 entries */, 32768)    = 0
close(16)                               = 0
access("/home/foo/.claws-mail/RSSyl/My Feeds (RSSyl)//Reddit Linux/.deleted", F_OK) = -1 ENOENT (No such file or directory)
stat("/home/foo/.claws-mail/RSSyl/My Feeds (RSSyl)//Reddit Linux/.deleted", 0x7ffc13680400) = -1 ENOENT (No such file or directory)

Which I don't know if it has anything to say. Looking at all the folders from the Reddit feels shows empty folders, but folders from other feeds contains files.
Comment 1 Andrej Kacian 2016-01-27 15:03:02 UTC
That's because RSSyl does not yet handle Atom content encoded as xhtml, which means inline HTML tags mixed up with XML structure of the feed. See http://atomenabled.org/developers/syndication/#text for reference.

I plan to do this eventually, but I can't give any estimates right now.
Comment 2 users 2016-01-27 16:55:03 UTC
Changes related to this bug have been committed.
Please check latest Git and update the bug accordingly.
You can also get the patch from:
http://git.claws-mail.org/

++ ChangeLog	2016-01-27 16:55:02.846142703 +0100
http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=2e8cb034dc224a28153ca9a0b810ae4a640ebeff
Merge: f394b61 543c7d3
Author: Colin Leroy <colin@colino.net>
Date:   Wed Jan 27 16:55:02 2016 +0100

    Merge branch 'master' of file:///home/git/claws

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=543c7d33942ec31d4f81af6ecc0aa2aa28e85e7c
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Wed Jan 27 16:54:07 2016 +0100

    RSSyl: Handle XHTML content correctly for Atom feeds.
    
    Fixes bug #3603.
Comment 3 Andrej Kacian 2016-01-27 19:20:20 UTC
The fix will be in next Claws Mail release. Thanks for the bugreport!
Comment 4 greencoppermine 2016-01-27 21:48:34 UTC
I added the patches on Debian and tried to build the package, but got the following error:

parser_atom10.c:35:2: error: redeclaration of enumerator 'FEED_LOC_ATOM10_NONE'
  FEED_LOC_ATOM10_NONE,
  ^
In file included from parser.h:25:0,
                 from parser_atom10.c:31:
parser_atom10.h:27:2: note: previous definition of 'FEED_LOC_ATOM10_NONE' was here
  FEED_LOC_ATOM10_NONE,
  ^
parser_atom10.c:36:2: error: redeclaration of enumerator 'FEED_LOC_ATOM10_ENTRY'
  FEED_LOC_ATOM10_ENTRY,
  ^
In file included from parser.h:25:0,
                 from parser_atom10.c:31:
parser_atom10.h:28:2: note: previous definition of 'FEED_LOC_ATOM10_ENTRY' was here
  FEED_LOC_ATOM10_ENTRY,
  ^
parser_atom10.c:37:2: error: redeclaration of enumerator 'FEED_LOC_ATOM10_AUTHOR'
  FEED_LOC_ATOM10_AUTHOR,
  ^
In file included from parser.h:25:0,
                 from parser_atom10.c:31:
parser_atom10.h:29:2: note: previous definition of 'FEED_LOC_ATOM10_AUTHOR' was here
  FEED_LOC_ATOM10_AUTHOR,
  ^
parser_atom10.c:38:2: error: redeclaration of enumerator 'FEED_LOC_ATOM10_SOURCE'
  FEED_LOC_ATOM10_SOURCE,
  ^
In file included from parser.h:25:0,
                 from parser_atom10.c:31:
parser_atom10.h:30:2: note: previous definition of 'FEED_LOC_ATOM10_SOURCE' was here
  FEED_LOC_ATOM10_SOURCE,
  ^
parser_atom10.c:39:2: error: redeclaration of enumerator 'FEED_LOC_ATOM10_CONTENT'
  FEED_LOC_ATOM10_CONTENT
  ^
In file included from parser.h:25:0,
                 from parser_atom10.c:31:
parser_atom10.h:31:2: note: previous definition of 'FEED_LOC_ATOM10_CONTENT' was here
  FEED_LOC_ATOM10_CONTENT
  ^
parser_atom10.c:40:3: error: conflicting types for 'FeedAtom10Locations'
 } FeedAtom10Locations;
   ^
In file included from parser.h:25:0,
                 from parser_atom10.c:31:
parser_atom10.h:32:3: note: previous declaration of 'FeedAtom10Locations' was here
 } FeedAtom10Locations;
   ^
Makefile:557: recipe for target 'libfeed_la-parser_atom10.lo' failed
make[8]: *** [libfeed_la-parser_atom10.lo] Error 1
Comment 5 Andrej Kacian 2016-01-27 21:59:26 UTC
Your source tree must be mangled in some way, the FeedAtom10Locations enum is not defined parser_atom10.h at all, see http://git.claws-mail.org/?p=claws.git;a=blob;f=src/plugins/rssyl/libfeed/parser_atom10.h;hb=HEAD how the file should look like.
Comment 6 greencoppermine 2016-01-27 22:34:24 UTC
Thanks a lot! I don't know what the Debian guys have changed, but I used the original and compiled RSSyl. The feeds work now.
Comment 7 greencoppermine 2016-01-27 23:05:49 UTC
Hmm. Dates gets messed up. See screenshot for the Linux feed on Reddit.

http://ibin.co/2Uwf4rnyft7e
Comment 8 Andrej Kacian 2016-01-27 23:53:56 UTC
Works over here: http://ibin.co/2Uwt9pQZk5Ms

You should update Claws Mail to at least 3.12.0, where this particular bug was fixed.