Enabling rss feeds on a vanilla forum that doesn’t allow public browsing
August 3rd, 2007
Situation
I recently installed the Vanilla forum and set it up so that it would not allow public browsing, because the discussions there are top secret
I then installed the Feedpublisher extension to allow for RSS2 and ATOM feeds.
Problem
I encountered a major problem though, the rss feeds were not accessible because the forum did not allow public browsing. I also saw that on the vanilla community forum, this problem had been rasied, but no-one had offered a solution.
Also, when trying to access the feed through the browser, one gets an authentication pop up box requested a username and password. When one enters the username and password into the respective text fields the following error message is displayed:
A fatal, non-recoverable error has occurred
Technical information (for support personel):
Error Message
An error occurred while validating user credentials.
Affected Elements
Feed.ValidateCredentials();
The error occurred on or near: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(u.Password = md5('foobar') or u.Password = 'foobar' )' at line 1
Solution
After quite a bit of playing around and testing, I found a relatively easy solution to the problem – typical a five minute fix for an error that keeps you busy for 2 hours!!!
Step 1
So firstly go to /extensions/Feedpublisher/default.php and make sure that the following section of code looks like this (line 60-73 )
if ( $Context->Session->UserID == 0 && ! $Configuration[ "PUBLIC_BROWSING" ] )
{
// Temporarily make the PUBLIC_BROWSING enabled,
// but make sure to validate this user
$Configuration[ "PUBLIC_BROWSING" ] = 1;
$Context->Configuration[ 'AUTHENTICATE_USER_FOR_FEED_PUBLISHER' ] = 0;
}
else
{
$Context->Configuration[ 'AUTHENTICATE_USER_FOR_FEED_PUBLISHER' ] = 0;
}
Step 2
Then login to the admin section of the forum go to settings > categories > $category edit
Then you need to check the “unauthenticated” option in the “Roles” and hot save. Do this for each and every category, unless you don’t want a specific category to be displayed on the feed.
This method fixed my problem, so I would be interested to find out if anyone else has a better solution. Also let me know id it doesn’t work for you – I hope that’s not the case though.

Leave a Reply