Last modified: 2014-11-02 12:51:40 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 T57235, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55235 - Treat code-only interwikis as valid for main page
Treat code-only interwikis as valid for main page
Status: NEW
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Low enhancement
: ---
Assigned To: Pywikipedia bugs
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-05 04:48 UTC by Kunal Mehta (Legoktm)
Modified: 2014-11-02 12:51 UTC (History)
5 users (show)

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


Attachments

Description Kunal Mehta (Legoktm) 2013-10-05 04:48:34 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1344/
Reported by: Anonymous user
Created on: 2011-09-19 11:07:11
Subject: Treat code-only interwikis as valid for main page
Assigned to: xqt
Original description:
Interwiki in the form of \[\[en:\]\] links to the main page.

It is easy to generate \(on Toolserver or from SiteMatrix\) a list of interwikis in this form for the main page and they are correct links.

So the bot must not remove them nor change them.

Suggesting the following process:
1\) Pull MediaWiki:Mainpage and store it in some variable.
2\) When dealing with interwiki, first compare, if the page title == that variable.
3\) If yes, simply put short interwikis there \(or at least do not remove nor correct them to long\)
Comment 1 Kunal Mehta (Legoktm) 2013-10-05 04:48:36 UTC
r9672 enables short interwiki links but replaces the page title to the MediaWiki:Mainpage message
Comment 2 Kunal Mehta (Legoktm) 2013-10-05 04:48:38 UTC
- **assigned_to**: nobody --> xqt
Comment 3 Kunal Mehta (Legoktm) 2013-10-05 04:48:39 UTC
- **priority**: 5 --> 4
Comment 4 Kunal Mehta (Legoktm) 2013-10-05 04:48:41 UTC
Is this useful?  Most mainpages are protected aren't they?  Why don't we just have the bot ignore/skip mainpages altogether?
Comment 5 Kunal Mehta (Legoktm) 2013-10-05 04:48:43 UTC
I guess it is usefull if the bot can handle with links like \[\[:en:\]\] rather than giving an error. It is able to create a page objekt. And this could be used indepedent from operating on the main page itself.
Comment 6 Fabian 2014-11-02 12:51:40 UTC
With at least https://git.wikimedia.org/commit/pywikibot%2Fcore.git/71ccd1267c2407fc3fea1210c5f442edb7f6d9c3 Link.parse supports interwiki links without any title (so [[en:]] for example). So the bot ifself should substitute '' with the mainpage. I previously wanted to add it but John pointed out that it's problematic:

https://gerrit.wikimedia.org/r/#/c/161671/1/pywikibot/page.py,cm

So I'm not sure what we can do about that here. Maybe Page.__init__ does change '' automatically to mainpage or so.

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


Navigation
Links