Attempting to import a title that came out as an interwiki would sort of half-work...
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 10 Dec 2008 22:41:13 +0000 (22:41 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 10 Dec 2008 22:41:13 +0000 (22:41 +0000)
Fatal error:  Call to a member function insertOn() on a non-object in /Library/WebServer/Documents/trunk/includes/specials/SpecialImport.php on line 305

Now such titles are skipped. You can probably force import of the page by forcing the target namespace...

Better long-term solution might include title renormalization, adapation of remote namespace names (eg Wikipedia -> Project), etc.

includes/Import.php

index 7c98b68..56e7a7f 100644 (file)
@@ -776,6 +776,9 @@ class WikiImporter {
                        if( is_null( $this->pageTitle ) ) {
                                // Invalid page title? Ignore the page
                                $this->notice( "Skipping invalid page title '$this->workTitle'" );
+                       } elseif( $this->pageTitle->getInterwiki() != '' ) {
+                               $this->notice( "Skipping interwiki page title '$this->workTitle'" );
+                               $this->pageTitle = null;
                        } else {
                                $this->pageCallback( $this->workTitle );
                        }