Advanced Search

RSS Feed from Forums Broken

Recent Forums Main Forum Suggestion Box RSS Feed from Forums Broken

Viewing 15 posts - 1 through 15 (of 28 total)
  • Author
    Posts
  • #6211
    Ryan Stasel
    Participant
    • Topics: 5
    • Replies: 56

    Maybe I’m the only one, but I subscribe to the forums in Google Reader, and all along, while Google Reader will grab the articles, the link provided to them is incorrect due to missing &’s.

    So instead of something like:
    http://www.wickededgeusa.com/index.php?option=com_kunena&func=view&catid=9&id=5952&Itemid=63
    it’s
    http://www.wickededgeusa.com/index.php?option=com_kunenafunc=viewcatid=9id=5952Itemid=63#5952

    Obviously incorrect.

    I’m not sure, but it appears this may be due to some weird configuration with the RSS feed being redirected.

    Is anyone else seeing this issue? I’d be happy to troubleshoot/diagnose further if needed/wanted.

    #6213
    wickededge
    Keymaster
    • Topics: 123
    • Replies: 2940

    Hi Staze,

    Thank you for pointing this out. I’ll pass it along to our webmaster right away.

    –Clay

    Maybe I’m the only one, but I subscribe to the forums in Google Reader, and all along, while Google Reader will grab the articles, the link provided to them is incorrect due to missing &’s.

    So instead of something like:
    http://www.wickededgeusa.com/index.php?option=com_kunena&func=view&catid=9&id=5952&Itemid=63
    it’s
    http://www.wickededgeusa.com/index.php?option=com_kunenafunc=viewcatid=9id=5952Itemid=63#5952

    Obviously incorrect.

    I’m not sure, but it appears this may be due to some weird configuration with the RSS feed being redirected.

    Is anyone else seeing this issue? I’d be happy to troubleshoot/diagnose further if needed/wanted.

    -Clay

    #6214
    Ryan Stasel
    Participant
    • Topics: 5
    • Replies: 56

    Note the RSS feed fails validation:

    http://validator.w3.org/appc/check.cgi?url=http%3A%2F%2Fwww.wickededgeusa.com%2Findex.php%3Foption%3Dcom_kunena%26func%3Drss%26catid%3D3%26Itemid%3D63

    It would seem the missing &’s may be a bug with Google Reader dealing with malformed XML, but I’m not 100% confident on that. Attempting to curl the rss feed results in a 303 “See Other” which seems… odd. But maybe that’s how IIS deals with basic redirects.

    #6216
    Ryan Stasel
    Participant
    • Topics: 5
    • Replies: 56

    Hi Staze,

    Thank you for pointing this out. I’ll pass it along to our webmaster right away.

    –Clay

    Clay,

    Awesome. Let him/her know I’d be happy to help test fixes, confirm it works, etc. They’re welcome to contact me directly if desired.

    #6236
    Anonymous
    Inactive
    • Topics: 2
    • Replies: 8

    Hi,
    I am looking into this issue. It is interesting, if you look at the actual feed, the link is correct. I am going to try a different feed reader and see what happens. I will keep you posted.

    Thank you

    #6238
    Ryan Stasel
    Participant
    • Topics: 5
    • Replies: 56

    Indeed.

    I did find this: http://www.kunena.org/forum/4/2393-enhanced-kunena-rss-feed/15078 via google, but I don’t have an account, so I can’t read it.

    I just looked for “kunena” and amp;.

    There’s this too: http://www.kunena.org/forum/159-K-17-Common-Questions/93971-rss-feed-is-not-working

    Part of it may be just the fairly old version of Kunena that’s being used. Looks like it’s from 10/2010 or so. =/

    #6239
    Ryan Stasel
    Participant
    • Topics: 5
    • Replies: 56

    Firefox doesn’t show ANYTHING other than the forum title for the RSS feed. Having coded my own RSS feed generators previously, I know that if something doesn’t pass that W3 validator, all kinds of weird crap can happen at the client end. I’m guessing that Line 19 error here is probably a good chunk of the issues.

    #6240
    Anonymous
    Inactive
    • Topics: 2
    • Replies: 8

    Hi,
    Everything works fine under outlook rss reader. I am working on the validation now.
    Thank you for your help with this.

    Thanks

    #6242
    Ryan Stasel
    Participant
    • Topics: 5
    • Replies: 56

    lol. Figures Outlook would ignore the issues.

    Do the links to the actual forum thread work in Outlook? Guess I can try Mac Mail…..

    #6243
    Anonymous
    Inactive
    • Topics: 2
    • Replies: 8

    Yep, they all link back correctly.

    #6244
    Ryan Stasel
    Participant
    • Topics: 5
    • Replies: 56

    Mac Mail RSS reader works too, and all the links for read more work. Interesting…

    So Google reader is just being wonky with the validation issues.

    It LOOKS like the RSS feed should be feeding “escaped” ampersands: http://stackoverflow.com/questions/1030102/why-cant-rss-handle-the-ampersand rather than &. Which makes sense, but I’m not sure it was ever allowed. Which would make sense why Reader is removing them, since they’re not allowed. No idea why Outlook and Mail simply allow them. Guessing to appease noisy RSS feeds.

    http://www.therssweblog.com/?guid=20070522124846

    Which makes me think… I’m going to run a quick test. Give me a few…

    #6247
    Ryan Stasel
    Participant
    • Topics: 5
    • Replies: 56

    You must be working on it at the same time, because now I’m getting weird results.

    I was attempting to read in the RSS line by line, then replace any instances of & in a link or guid, with an &, but it appears some URLS now have & and some don’t.

    So, will let you continue working. Let me know if you need additional input/testing. Thanks!

    #6248
    wickededge
    Keymaster
    • Topics: 123
    • Replies: 2940

    It’s not me, but it might be the webmaster working at it too. I’ll check with him and see what he has to say.

    You must be working on it at the same time, because now I’m getting weird results.

    I was attempting to read in the RSS line by line, then replace any instances of & in a link or guid, with an &, but it appears some URLS now have & and some don’t.

    So, will let you continue working. Let me know if you need additional input/testing. Thanks!

    -Clay

    #6253
    Ryan Stasel
    Participant
    • Topics: 5
    • Replies: 56

    Okay, here’s what I’ve got at this point:

    http://www.staze.org/static/fixwerss.php

    This allows google reader to work…

    All I’m doing is reading in the RSS line by line, and looking for any line that has in it, and then replacing any & with &

    [code]foreach($feed_array as $line) {
    if(preg_match(“”,$line)) {
    $fixed = preg_replace(“/&/”, “&”, $line);
    } elseif (preg_match(““,$line)) {<br /> $fixed = preg_replace(“/&/”, “&”, $line);<br /> } else {<br /> $fixed = $line;<br /> }<br /> echo $fixed;<br /> }[/code]</p> <p>I was also trying to fix the & in the field, but it doesn’t seem to be working, but on the positive side, that doesn’t seem to be breaking google reader.</p> <p>Whole code is here: </p> <p>[code]<?php<br /> header('Content-Type: text/xml; charset=UTF-8');<br /> function get_url_contents($url) {<br /> //echo $url;<br /> $crl = curl_init();<br /> $timeout = 5;<br /> curl_setopt ($crl, CURLOPT_URL, $url);<br /> curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1);<br /> //curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout);<br /> curl_setopt ($crl, CURLOPT_HEADER, 0);<br /> curl_setopt ($crl, CURLOPT_USERAGENT, "Mozilla/4.0");<br /> $ret = curl_exec($crl);<br /> curl_close($crl);<br /> return $ret;<br /> }</p> <p>$url = '<a href="http://www.wickededgeusa.com/index.php?option=com_kunena&func=rss&Itemid=63&#039" rel="nofollow">http://www.wickededgeusa.com/index.php?option=com_kunena&func=rss&Itemid=63&#039</a>;;<br /> $feed = get_url_contents($url);<br /> $feed_array = explode("r", $feed);<br /> //print_r($feed);<br /> foreach($feed_array as $line) {<br /> if(preg_match("”,$line)) {<br /> $fixed = preg_replace(“/&/”, “&”, $line);<br /> } elseif (preg_match(““,$line)) {<br /> $fixed = preg_replace(“/&/”, “&”, $line);<br /> } else {<br /> $fixed = $line;<br /> }<br /> echo $fixed;<br /> }</p> <p>?>[/code]

    #6254
    Ryan Stasel
    Participant
    • Topics: 5
    • Replies: 56

    btw, realize the code is less than stellar. This is largely reused from fixing issues with Facebook’s broken RSS feeds…

Viewing 15 posts - 1 through 15 (of 28 total)
  • You must be logged in to reply to this topic.