Last modified: 2014-07-25 12:28:34 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 T42192, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40192 - Transwiki import summary link uses local namespace name which may not be defined on source wiki
Transwiki import summary link uses local namespace name which may not be defi...
Status: PATCH_TO_REVIEW
Product: MediaWiki
Classification: Unclassified
Export/Import (Other open bugs)
1.21.x
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
http://arz.wikipedia.org/w/index.php?...
: i18n
: 62821 (view as bug list)
Depends on:
Blocks: 30723
  Show dependency treegraph
 
Reported: 2012-09-12 20:05 UTC by Meno25
Modified: 2014-07-25 12:28 UTC (History)
3 users (show)

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


Attachments

Description Meno25 2012-09-12 20:05:09 UTC
When importing [[arz:قالب:Country data Cape Verde/doc]] (which is a template documentation page) from English Wikipedia to Egyptian Arabic (arz) Wikipedia, the edit summary of the import process

1 تعديل من en:قالب:Country data Cape Verde/doc: قالب متعاز و لسه محتاج ترجمه

contains a link to [[en:قالب:Country data Cape Verde/doc]] which is wrong because it shows the localized name of the template namespace in Arabic (قالب). Instead, the link should be [[en:Template:Country data Cape Verde/doc]].
Comment 1 This, that and the other (TTO) 2013-09-14 12:11:34 UTC
I just took a look at this:

As far as I can tell, the problem here is that the WikiImporter class (in Import.php) uses a Title object to store the title of the original page. However, WikiImporter doesn't know about interwiki prefixes, so it creates a Title with no interwiki prefix. This causes the Title class to assume it is dealing with a local page, so it uses local namespace names when generating a display form of the title.

This could partly be solved by always using canonical namespace names in the edit summary. However, that would probably fail in the following scenario:

* import "Portal:Foo" to a wiki where "Portal" is set as a namespace alias for
  the "Portada" namespace
* Title object returns a link to "Portada:Foo", which doesn't exist on the
  source wiki

But I am inclined to think it is a better stopgap solution (fixes the vast majority of cases) until someone can be bothered to overhaul WikiImporter!
Comment 2 Gerrit Notification Bot 2013-09-14 12:34:00 UTC
Change 84197 had a related patch set uploaded by TTO:
Make the link in import log entry always use canonical namespace

https://gerrit.wikimedia.org/r/84197
Comment 3 This, that and the other (TTO) 2014-07-25 11:21:36 UTC
*** Bug 62821 has been marked as a duplicate of this bug. ***
Comment 4 Gerrit Notification Bot 2014-07-25 12:19:20 UTC
Change 149293 had a related patch set uploaded by TTO:
Proper namespace handling for WikiImporter

https://gerrit.wikimedia.org/r/149293
Comment 5 Gerrit Notification Bot 2014-07-25 12:28:34 UTC
Change 84197 abandoned by TTO:
Make the link in import log entry always use canonical namespace

Reason:
OK, I decided to do this *for real* this time. See Iaa58e1b9fd

https://gerrit.wikimedia.org/r/84197

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


Navigation
Links