Issues with RSS views

I am now working on improving the RSS views.

Why, because some things are incorrect on all pages and list with RSS views.

I started with adding images to channels and items, which seems to works ok.

Files have an additional tag <enclosure> by default, but that fails the W3C feed validator http://validator.w3.org/feed/

I get failures like

url must be a full URL: 

Even when adding the correct file type, it still fails.

I'd like to fix this and maybe create a plugin or change it immediately in the core (if I can suggest the correct code change in a PR) so we will all have correct RSS urls and extend the possibility to share content with images for channels and items for at least blogs and files.

But I am blocked with this strange error, most RSS readers have no problem with the <enclosure> tag, but SimplePie which is widely used for importing RSS into sites does not understand it.

One other thing I needed to chang to get images with all blogs is the getIconUrl class, which now either includes an image that is related to the blog or the User ICON instead. So if we can get this right, I will make a request to change this class too.

Reference checks

List without an owner :

https://www.centillien.com/news/featured?view=rss

or with an owner:

https://www.centillien.com/news/owner/google?view=rss

I think it is cool but still need some help to get this fully validated as a legitimate RSS 2.0 feed

To get the feeling about this, only use Firefox or IE, Chrome simply displays the boring text output.

  • i just want to say that it is good that someone is looking at the rss feeds as they could use some attention. If you could provide PR's that would be great. Just make small baby step PR's instead of one big one. That will make it easier to pull things we agree on into core and leave other PR's waiting for more info or further discussion.

  • Oke Jeroen, I started with the first babystep PR. Fix the file <enclosure>

    There is another one coming after. I found out why W3C is not validating my file RSS.

    - The tag itself has a small error (see PR)

    - The enclosure tag doe not support https linked files. So a rewrite is required for https sites (like mine)

    For that second step I will suggest:

    $download_url = str_replace("https://", "http://", $download_url);

     

  • I agree ! I decided I wil not be building this as a plugin, but will try to improve the Elgg core RSS view system. Target is to make the current views more in line with the standard and add things like images to blogs and pages.

    I will recommend changes to Matts plugin and Jeroen's RSS widget on the fly.

  • I've got it working on my site so the code is ready, it is only a matter of getting the PR's approved. And getting to know the processes and formatting standards that the core team demands, that has proven for me to be a difficult task :-)

  • but rss feed does not work with walled garden enabled.. u know how to fix this problem?

  • @Satheesh - I am guessing that this is because your RSS reader can only see public posts and, in a walled garden, there are none. We (Matt) built http://community.elgg.org/plugins/762954/1.2/rssauth-18x to cater for this problem. It requires an RSS reader that supports authentication, which any decent reader should, but I'd guesstimate that less than half of them actually do.

    As an aside, it would be nice if Elgg support authenticated RSS natively - the SimplePie library is capable of handling this so it should be possible, in principle, to do this relatively easily.

  • @Sateesh PM, I see that RSS views are indeed not supported with walled garden. I think you only want RSS views for pages that are publicly made visible.

  • Hello Gerard,

    i'm french, i am not sure i understand everything you wrote in english, but i'm quite good in rss and rss2.

    The additional tag by default is not a problem. Most rss feed fails the W3C feed validator http://validator.w3.org/feed/. And i can assure you that Simplepie understand the tag, of course it does.

    With RSS2 for podcasts, for exemple, the mp3 files are in the tag, and all agregators understand it, and they use simplepie.

    I'm not sure i'm helping you, but i created a plugin based on simplepie and rss2 feeds from inside (any mp3s downloaded in elgg) and outside (any rss2 feeds from any podcast on the internet) and it's working perfectly. With automatic updates. You can see it there : http://community.elgg.org/plugins/1599770/1.0/jukebox

    I don't think there is something to change in core, it's already working for me.

    I think you maybe need to see this page from simplepie : http://simplepie.org/wiki/reference/simplepie_enclosure/get_handler

  • Note that there were some improvements to the rss views in elgg 1.8.19 to better validate on activity feeds.  If you're not upgraded to 1.8.19 that might be an easy fix.