Welcome, Guest
Username: Password: Remember me
This is the optional forum header for the Suggestion Box.

TOPIC: RSS Feed from Forums Broken

Re: RSS Feed from Forums Broken 2 years 6 days ago #6039

  • Staze
  • Staze's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 61
  • Thank you received: 10
  • Karma: 7
Okay, found the fix.

After installing Joomla 1.5.21, and Kunena 1.6, I found the configuration option that's the issue.

In the Joomla administration area, under Components, Kunena Forum, Configuration. In there is an RSS tab. Change the RSS Specification to RSS 2.0, and save. That should fix the issue. I'm guessing right now it's set to RSS 0.91, or RSS 1.0, both of which are pretty old at this point, and setting them that way is not really needed anymore.

Give that a shot, and let me know, and I'll give it a test. Weird that RSS previous to 2.0 allowed non-encoded URLs....

Thanks!
-Systems Administrator
"You mean you'll put down your rock and I'll put down my sword and we'll try to kill each other like civilized people?"

WEPS Pro-Pack I
The administrator has disabled public write access.

Re: RSS Feed from Forums Broken 2 years 6 days ago #6040

  • Staze
  • Staze's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 61
  • Thank you received: 10
  • Karma: 7
Though now that I look at the RSS feed raw, it says it's RSS 2.0, but obviously isn't valid.

Any chance you could tell which which specific version numbers of Kunena and Joomla are being run? I only see the major versions (Joomla 1.5, and Kunena 1.6).

Or maybe just the version of joomla/libraries/joomla/document/feed/renderer/rss.php (version should be at the top).

I'm a bit confused, as it seems like link's in general aren't being url encoded... which makes me think something is wonky.

Thanks!
-Systems Administrator
"You mean you'll put down your rock and I'll put down my sword and we'll try to kill each other like civilized people?"

WEPS Pro-Pack I
Last Edit: 2 years 6 days ago by Staze.
The administrator has disabled public write access.

Re: RSS Feed from Forums Broken 2 years 6 days ago #6041

  • wickededge
  • wickededge's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1858
  • Thank you received: 691
  • Karma: 93
Here are the Joomla! specs:

PHP Built on: Windows NT WEBB38 6.1 build 7601
Database Version: 5.0.54-log
Database Collation: utf8_general_ci
PHP Version: 5.2.17
Web Server: Microsoft-IIS/7.5
Web Server to PHP interface: cgi-fcgi
Joomla! Version: Joomla! 1.5.20 Stable [ senu takaa ] 18-July-2010 18:00 GMT
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.92 Safari/537.4

and the Kunena specs:

Installed version: Kunena 1.6.3
--Clay Allison
The administrator has disabled public write access.

Re: RSS Feed from Forums Broken 2 years 6 days ago #6042

  • Staze
  • Staze's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 61
  • Thank you received: 10
  • Karma: 7
excellent. I've recreated the issue with those versions. Now I get to find the fix. =)
-Systems Administrator
"You mean you'll put down your rock and I'll put down my sword and we'll try to kill each other like civilized people?"

WEPS Pro-Pack I
The administrator has disabled public write access.
The following user(s) said Thank You: wickededge

Re: RSS Feed from Forums Broken 2 years 6 days ago #6043

  • Staze
  • Staze's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 61
  • Thank you received: 10
  • Karma: 7
okay, got it fixed. Attached is a patch, and here's the manual way to do it.

In joomla/libraries/joomla/document/feed/renderer, there's rss.php. Open that up, and change line 123 from:
$feed.= "	<link>".str_replace(' ','%20',$data->items[$i]->link)."</link>\n";

to
$feed.= "	<link>".htmlspecialchars($data->items[$i]->link, ENT_COMPAT, 'UTF-8')."</link>\n";

then just comment out the next line, 124, with two forward slashes infront of it, so it looks like:
//$feed.= "<guid>".str_replace(' ','%20',$data->items[$i]->link)."</guid>\n";

That's all there is to it. Save and you're done.

So, the question is, why it's like this. Honestly, I don't know. The commented out part is likely because one person added some code and forgot to remove the old. All it does is fix the "duplicate GUID" validation issue. The first part of the code is to encode the url to be html safe, so replace & with &, spaces with %20, etc. Previously all they were doing was replacing spaces with %20. The other validation errors are annoying, but they're mainly cosmetic.

Obviously create a backup of rss.php before making changes, but having tested these with the same Joomla and Kunena versions, I'm fairly confident they'll work. Please let me know!
Attachments:
-Systems Administrator
"You mean you'll put down your rock and I'll put down my sword and we'll try to kill each other like civilized people?"

WEPS Pro-Pack I
Last Edit: 2 years 6 days ago by Staze.
The administrator has disabled public write access.

Re: RSS Feed from Forums Broken 2 years 6 days ago #6047

  • infowicked
  • infowicked's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1
  • Karma: 0
Hi Staze. Made your changes please check on your end. Thanks!
The administrator has disabled public write access.

Re: RSS Feed from Forums Broken 2 years 6 days ago #6048

  • Staze
  • Staze's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 61
  • Thank you received: 10
  • Karma: 7
Fascinating. Still doesn't work with Google Reader. But the w3c validator comes back "clean".

Only thing I can imagine is that it's the validator error saying "Your feed appears to be encoded as "utf-8", but your server is reporting "US-ASCII"

I'm not positive here, but that's all I can figure.

See here: forums.iis.net/p/1155439/1894464.aspx#1894464

Seems like we should just make .php encoding UTF-8. That's all I can figure at this point. =/
-Systems Administrator
"You mean you'll put down your rock and I'll put down my sword and we'll try to kill each other like civilized people?"

WEPS Pro-Pack I
The administrator has disabled public write access.

Re: RSS Feed from Forums Broken 2 years 6 days ago #6053

  • Staze
  • Staze's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 61
  • Thank you received: 10
  • Karma: 7
Okay, well, either something else got tweaked, or Google was caching bad data, or maybe the webserver was caching the previous php or output. Anyway, it's working now. =D The URL's are proper, and link to the appropriate articles. W3validator still shows the ASCII/UTF error, but I honestly don't think that's a huge issue unless you got non-english symbols in the URL (which I'm guessing won't happen anyway).

Thanks for your help on this. Now I can actually use the reader feed. =)

Let me know if you need any additional info, testing, etc. =)
-Systems Administrator
"You mean you'll put down your rock and I'll put down my sword and we'll try to kill each other like civilized people?"

WEPS Pro-Pack I
Last Edit: 2 years 6 days ago by Staze.
The administrator has disabled public write access.
The following user(s) said Thank You: wickededge
Time to create page: 0.132 seconds