Page MenuHomePhabricator

interwiki() fails for closed wikipedia
Closed, ResolvedPublic

Description

Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1608/
Reported by: cdpark
Created on: 2013-04-04 01:32:44
Subject: interwiki() fails for closed wikipedia
Assigned to: amird
Original description:
Page.interwiki\(\) and PageData.interwiki\(\) fails when wikidata contains sitelinks of closed wikipedias.

For example, following code is broken now.

\---------------------------------------------------------------------------------------------------
\#\!/usr/bin/python
\# -\*- coding: utf-8 -\*-

import pywikibot

en = pywikibot.getSite\('en', 'wikipedia'\)
mainpage = pywikibot.Page\(en, u'Main Page'\)
interwiki = mainpage.interwiki\(\)

print interwiki

\--------------------------------------------------------------------------------------------------------------


Version: unspecified
Severity: normal
See Also:
https://sourceforge.net/p/pywikipediabot/bugs/1608

Details

Reference
bz55146

Related Objects

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:22 AM
bzimport set Reference to bz55146.
bzimport added a subscriber: Unknown Object (????).
  • assigned_to: nobody --> amird

I posted this on the ML about a month ago \(http://lists.wikimedia.org/pipermail/pywikipedia-l/2013-March/007766.html\) and assumed that because no one responded it wasn't a big deal so I didn't bother fixing it.
This issue is more than just interwiki links, it's that we prevent read \(and write for stewards\) access for a locked \(but readable\) wiki.

I think the best way to fix it would be to split that list of obsolete wiki's into 3: locked, deleted, and obsolete \(renamed, backwards compatibility\), and then any wiki that is deleted/obsolete throw an error, but locked does not.

\(Setting group to none since this also affects rewrite branch\)

  • milestone: 346788 -->
  • labels: 745455 -->

Sorry, I misunderstood but every time i run the code on Main Page,bot returns me invalid title because the iws are invalid titles:
http://en.wikipedia.org/w/index.php?title=Template:Main\_Page\_interwikis&action=edit

can you give me another example \(e.g. a test userspace page\)

Change 112842 had a related patch set uploaded by Nullzero:
Make obsolete site object can be created

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

Change 112842 merged by jenkins-bot:
Make obsolete site object can be created

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