Last modified: 2014-08-22 07:10:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T71783, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69783 - RSS extension gives http-request-error when fetching http://blog.wikimedia.org/feed/
RSS extension gives http-request-error when fetching http://blog.wikimedia.or...
Status: RESOLVED WORKSFORME
Product: MediaWiki extensions
Classification: Unclassified
RSS (Other open bugs)
REL1_23-branch
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
aklapper-moreinfo
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-20 13:44 UTC by Jens Røbel
Modified: 2014-08-22 07:10 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jens Røbel 2014-08-20 13:44:33 UTC
This code:

<rss max=4 highlight="community wiki foundation">http://blog.wikimedia.org/feed/</rss>

Gives this result:

Failed to load RSS feed from http://blog.wikimedia.org/feed/: HTTP-forespørgslen fejlede af ukendte årsager. 

Any ideas?

Thanks 
Jens Roebel
Comment 1 Andre Klapper 2014-08-20 14:09:06 UTC
(In reply to Jens Røbel from comment #0)
> Gives this result:
> 
> Failed to load RSS feed from http://blog.wikimedia.org/feed/:
> HTTP-forespørgslen fejlede af ukendte årsager. 

Where can this result be seen and how exactly to reproduce?

I pasted your one line via "Show Preview" on https://www.mediawiki.org/w/index.php?title=User:AKlapper_(WMF)/Bug69783 and results were as expected.
Comment 2 Bawolff (Brian Wolff) 2014-08-20 17:45:53 UTC
I assume this is not on a Wikimedia wiki?

(Error in particular happens only when using php url_fopen to fetch urls (Not used on Wikimedia sites, since we have the curl php extension installed)).

This error generally means that fopen( 'http://blog.wikimedia.org/feed/' ); returned false. I'm not sure why it is doing so in your particular install. I suspect (but am not sure) its a problem with your php.ini configuration.
Comment 3 Bawolff (Brian Wolff) 2014-08-20 17:48:42 UTC
On line 907 and 909 of includes/HttpFunctions.php there is a wfSuppressWarnings(); and a wfRestoreWarnings(); respectively. Removing both of those may cause a warning to be output (Assuming you have php warnings enabled), that may help you debug the situation.
Comment 4 T. Gries 2014-08-20 18:58:22 UTC
Please use _latest_ RSS Version from the repo!
Comment 5 Jens Røbel 2014-08-21 09:01:29 UTC
Removing wfSuppressWarnings(); and wfRestoreWarnings();
gives the below warning

Warning fopen(http://blog.wikimedia.org/feed/): failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond in C:\Apache2.2\htdocs\wiki\includes\HttpFunctions.php on line 916

I have a suspicion that it may be related to limitations in the firewall setup on our network.

I will try the same on my private network.

The version of RSS extension is 2.25.0

Thanks 
Jens
Comment 6 Kunal Mehta (Legoktm) 2014-08-21 09:04:38 UTC
The blog recently moved from Wikimedia servers to Automattic ones, so if you had whitelisted the WMF servers, that might need updating?
Comment 7 Jens Røbel 2014-08-21 09:07:32 UTC
For test purpose I have the below settings
$wgRSSUrlWhitelist = array( "*" );
Comment 8 Jens Røbel 2014-08-21 09:11:07 UTC
We use proxy server. Where can I specify name and port ?
Comment 9 Andre Klapper 2014-08-21 11:08:51 UTC
So this does not sound like something is wrong in the code of MediaWiki (a so-called "bug"), but instead like a support request (how to change settings, questions how to do something, etc.). As bugzilla.wikimedia.org is only for specific bug reports and enhancement requests, I am closing this ticket as RESOLVED WORKSFORME.
Comment 10 Bawolff (Brian Wolff) 2014-08-21 17:16:14 UTC
(In reply to Jens Røbel from comment #8)
> We use proxy server. Where can I specify name and port ?

See [[mw:manual:$wgHTTPProxy]]
Comment 11 T. Gries 2014-08-21 20:25:31 UTC
Please read the RSS Extension manual page http://www.mediawiki.org/wiki/Extension:RSS#Configuration_settings and quickly find 

$wgRSSProxy (default: false) Optional proxy server to be used for fetching feeds
false: no proxy used

See also file RSS.php.
Comment 12 Jens Røbel 2014-08-22 06:50:22 UTC
That did it :-)

After specifying $wgRSSProxy with proxyservername and portnumber everthing works perfectly.

Thanks a lot.

Jens
Comment 13 T. Gries 2014-08-22 07:10:01 UTC
Jens, better always read the documentation first, please.
I invested a lot to document all my extensions in the best possible way.

Nice to learn that your problem is fixed.

Just as a remark:

In certain installations (like in my own), it might be necessary to use a proxy when fetching RSS feeds from locations outside an enterprise internet, wherease you must not use a proxy when fetching RSS feeds from Urls inside the intranet. 

For such cases, a "switch" muss be toggled, see how in the code !

https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FRSS/26b9a910ecafd461097932fd044028655350d389/RSSParser.php#L239

// Example for disabling proxy use for certain urls
// $noProxy = preg_match( '!\.internal\.example\.com$!i', parse_url( $url, PHP_URL_HOST ) );

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links