Jump to content

Topic on Extension talk:RSS

Feed is not in the whitelist -- Where is RSS.php?

18
Summary by Leonardo Rocca

Use square brackets in the parameter syntax that whitelists the URLs in the LocalSettings.php file.

e.g. $wgRSSUrlWhitelist = [ 'URL' ];

104.174.184.30 (talkcontribs)

Heya,

I've recently installed the extension and have been puzzled as to where I find the configuration file. I've been reading the manual and it says something about RSS.php, yet when I search through the extension folder, I can't find it. Where do I configure the extension? I need to add something to the whitelist.


Thank you ahead of time!

CayceP (talkcontribs)
104.174.184.30 (talkcontribs)

Hey, thank you for the heads up!

So far the only setting I wanted to mess with was the whitelist, and I came up with

$wgRSSUrlWhitelist = ('URL');

I still get the "not whitelisted" error message. Am I missing something?

CayceP (talkcontribs)

That is odd. Does $wgRSSUrlWhitelist = ( "*" ); work?

104.174.184.30 (talkcontribs)

No luck, sadly! :(

CayceP (talkcontribs)

Odd. Which MediaWiki version are you currently using? Does the extension show up in you SpecialPage:Version page?

I would recommend to remove the extension from your FTP and download the correct corresponding version of the extension once more and install it again. Be sure to use the correct code in your LocalSettings.php according to your wiki version. Also run http://yourwikis.address/w/mw-config/ once to make sure you installation's data base is up-to-date (I don't think this Extension changes any tables but you might have installed something else that did and where the tables weren't updated properly which can lead to strange side effects).

Also, you please paste the $wgRSSUrlWhitelist = ('URL'); entry that didn't work?

104.174.184.30 (talkcontribs)

Heya, here's my version information!

What actions should I take based on this info? I'm going to see if removing and reinstalling works, but any pointers outside of that would be super appreciated.

Thank you again for your help and patience, I really appreciate it!


Ah, so the entry I used was $wgRSSUrlWhitelist = ( "*" );

CayceP (talkcontribs)

Hmm. Did you have any luck with reinstalling the extension and providing your RSS feedurl in $wgRSSUrlWhitelist = ( "*" );? Also could you please post the URL to the RSS feed you try to display so I can test if it works for me?

Orribu (talkcontribs)

Oof, sorry for the lateness. It's been a hectic handful of months. @_@

So I reinstalled and tried $wgRSSUrlWhitelist = ( "*" ); again, but to no avail.

Just to make sure, I'm to add $wgRSSUrlWhitelist = ( "*" ); to the same LocalSettings.php file in which I load the extension, right?

The RSS feed is https://twistedfates.net/blog/feed.

Thanks again for your help and patience!

CayceP (talkcontribs)

Okay, I think I found the issue. First, $wgRSSUrlWhitelist = ( "*" ); doesn't work at all and throws an parser error on my local XAMPP installation. It looks like the extension requires that a valid feed to end on a .xml or .rss. You page seems to use Wordpress which comes with built-in RSS feed generator but there seems to be no accessible feed url ending with .xml or .rss. A workaround would be to generate a feed with a service like feedity.com since $wgRSSUrlWhitelist = "https://feedity.com/twistedfates-net/UlJWU1pUVA.rss"; for example works for me. Or maybe there is a Wordpress plugin that generates RSS feeds with an url that has the .xml or .rss ending. https://wordpress.org/plugins/feedwordpress/ may work but it seem unmaintained and/or unsuported for recent version of Wordpress...

Orribu (talkcontribs)

Thank you so much for the response! I want to go the feedity route if that's cool.

So I took a copy of the snippet you provided and the front end still says that there's no allowed URLS in the whitelist. Could I perhaps be putting this snippet of code on the wrong place?


CayceP (talkcontribs)

Hmm. This did work for me when placed at the bottom in my LocalSettings.php:


wfLoadExtension( 'RSS' );
$wgRSSUrlWhitelist = "https://feedity.com/twistedfates-net/UlJWU1pUVA.rss";
$wgRSSAllowLinkTag = true;
$wgRSSItemMaxLength = 6000;
$wgRSSCacheAge = 10;
$wgAllowImageTag = true;
wfLoadExtension( 'RSS' ); $wgRSSUrlWhitelist = "https://feedity.com/twistedfates-net/UlJWU1pUVA.rss"; $wgRSSAllowLinkTag = true; $wgRSSItemMaxLength = 6000; $wgRSSCacheAge = 10; $wgAllowImageTag = true;

when you copy and paste the RSS url, be careful that there is no trailing whitespace after the .rss due to the external link icon here. I would recommend that you paste the snippet into an text editor like notepad or sublime etc to make sure that there is only text in the LocalSettings.php

Orribu (talkcontribs)

Hey there, I've copied and pasted the code using Atom, but to no avail. Is Atom a good text editor, or should I stick with notepad?

At this point I think there's something going on outside of the plugin that might be causing the issue. There might be a compatibility issue with another plugin or something, maybe. I'm not sure! :(

CayceP (talkcontribs)

I think any programming text editor should do, including notepad... Do you still get the same error message? Could it be that somewhere in your LocalSettings.php there is another $wgRSSUrlWhitelist declaration still?

You could try to temporary deactivate all other extension by out-commenting them with a # in the LocalSettings.php dor troubleshooting for finding out whether another Extension is causing this. And please double check that you have installed the correct version of the extension for your mediawiki core.

Orribu (talkcontribs)

Hiya, thanks again! My web-hosting plan expires soon, so I must wave the white flag.

I really want to thank you for your time! Is there somewhere where I can tip you or anything?

CayceP (talkcontribs)

I'm sorry to hear that. I keep my finders crossed that you maybe find another webhsoting. If you want, you could buy me a coffee via paypal at ko-fi. That is the first time that someone offers a tip for my advice :-)

Orribu (talkcontribs)

Oh hey, it's no problem! So sorry I couldn't give more (gosh the US Dollar is worthless lol), but I really do appreciate all your help. You are amazing. :'D <3

Leonardo Rocca (talkcontribs)

I simply fixed the same problem by using this syntax in the LocalSettings.php file:

$wgRSSUrlWhitelist = [ 'URL' ];


I assume by your conversation that the problem were the brackets used in the syntax. Since the parameter is an array, you should be using square brackets.