Page MenuHomePhabricator

Enable Special:Import on se-chapter
Closed, InvalidPublic

Description

Author: davidohlin

Description:
Hello,

On behalf of the board of the Swedish chapter (Wikimedia Sverige), we would like to enable Special:Import on se.wikimedia.org in order to import articles from sv.wikipedia.org.

Regards,
David Öhlin/Caesar


Version: unspecified
Severity: enhancement
URL: http://se.wikimedia.org/

Details

Reference
bz15065

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:20 PM
bzimport set Reference to bz15065.
bzimport added a subscriber: Unknown Object (MLST).

Added 'w:sv' to $wgImportSources for sewikimedia.

mickewiki wrote:

Thanks for fixing this, but it seems some problem is still linguering:

We get the error message:
Importen misslyckades: Misslyckades med att öppna importfilen.

Whiche means:
Import failed: Failure to open import-file

/Micke

Ok, a little background...

  1. The interwiki config is a little sloppy and is sending just 'w' to se.wikipedia.org, which is some other language, so I stuck 'w:sv' in ImportSources to get Swedish correctly.
  1. But that goes via an HTTP redirection...
  1. Which _may_ interfere with some behavior, as it will change from POST to GET and the intermediate redirect will lose the 'history=1' option :(
  1. But more dangerously, it looks like Http::request() isn't following redirects! It just fails outright.

This return check looks suspicious:

  1. Don't return the text of error messages, return false on error

if ( curl_getinfo( $c, CURLINFO_HTTP_CODE ) != 200 ) {

		$text = false;

}

should check whether CURL will follow the redirect for us or if we have to loop it manually, and what happens to the result code...

mickewiki wrote:

What does that mean? Is it possible to fix this? If else, is there some other way for us to import 6 specific articles from sv.wiki with full history? Could we specify which articles are concerned and someone will put them i our database using some other interface?

/Micke

mike.lifeguard+bugs wrote:

Looks to me like Brion is saying the code needs changing. If that's the case, I guess there's nothing to do on shell at present & then the shell keyword should be removed.

Is this still a issue for you guys trying to import?

davidohlin wrote:

Using import was really only relevant at the time of the original request, when we had a team working on importing articles from Wikipedia to create a paper book. Since it didn't work, the team found another way.

I don't know if it works or not, but to my knowledge, it is not needed anymore.