Page MenuHomePhabricator

IWM: APISite.article_path does not support sites using trailing '/'
Open, HighPublic

Description

bcd8ec89c6105 replaced Family.nicepath with APISite.article_path , and implemented Page.full_url using APISite.article_path

APISite.article_path currently requires that siteinfo attribute articlepath ends with $1, and uses an assert to confirm this.

There is at least one site on the IWM where the articlepath which does not end with $1

'Baden' : http://www.stadtwiki-baden-baden.de/w/api.php?action=query&meta=siteinfo&format=jsonfm

In that case, the trailing / is not necessary when accessing the site; URLs without the trailing / work correctly.
So, it would be possible to ignore the trailing /.

However, a bigger problem exists if there are sites which require something after the $1.

Event Timeline

jayvdb raised the priority of this task from to Needs Triage.
jayvdb updated the task description. (Show Details)
jayvdb added a subscriber: jayvdb.

Change 322398 had a related patch set (by Matěj Suchánek) published:
Workaround for T111513

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

Can someone review and merge pls? I get error reffering to this bug saying on many articles at cs.wiki

ValueError: Text after the $1 placeholder is not supported (T111513).

Thanks.

Dvorapa renamed this task from APISite.article_path does not support sites using trailing '/' to IWM: APISite.article_path does not support sites using trailing '/'.Jun 4 2018, 7:10 PM
Dvorapa removed a project: Pywikibot-Interwiki-Map.

Archiving unused project

Change 651007 had a related patch set uploaded (by Xqt; owner: Urbanecm):
[pywikibot/core@master] solve_disambiguation: Ignore ValueError

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

Xqt triaged this task as Medium priority.Jan 10 2021, 12:36 PM

Change 651007 merged by Xqt:
[pywikibot/core@master] solve_disambiguation: Ignore ValueError

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

Xqt raised the priority of this task from Medium to High.Jan 10 2021, 1:06 PM
Xqt removed a project: Patch-For-Review.

Change 693651 had a related patch set uploaded (by Meno25; author: Meno25):

[pywikibot/core@master] fixing_redirects.py: Ignore ValueError

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

Meno25 removed a subscriber: gerritbot.
Meno25 added a subscriber: Meno25.

Change 693651 merged by jenkins-bot:

[pywikibot/core@master] fixing_redirects.py: Ignore ValueError

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