I found a nice script to import xml using powershell
http://slash4.de/tutorials/Automatic_mediawiki_page_import_powershell_script
Currently I don’t get them run. I’m sure, this is a problem with the permissons.
First I set the wiki to allow anybody to upload an import
$wgGroupPermissions['*']['import'] = true;
$wgGroupPermissions['*']['importupload'] = true;
Then I get this error: Import failed: Loss of session data.
I try to figure out to pass the user and password to this line in powershell
$req.Credentials = [System.Net.CredentialCache]::DefaultCredentials
and changed it to
$req.Credentials = [System.Net.CredentialCache]::("user", "pass")
Import failed: Loss of session data. Again?
How can I pass the user/password to the website?
The
Loss of session dataerror is generated when the edit token sent with the request does not have the expected value.In the script you linked to, the
$wikiURLstring containseditToken=12345. That does not look like a valid MediaWiki edit token, so it’s not surprising that it will fail.In current versions of MediaWiki, the edit token for non-logged-in users is always
+\. You could try replacing12345in the script with that (or, rather, with its URL-encoded version%2B%5C) and see if it helps.