Page MenuHomePhabricator

Authorship tool fails for pages with a slash in the title
Closed, DuplicatePublic

Description

The Authorship tool fails for pages that contain a slash in the title.

Example for https://de.wikipedia.org/wiki/C/2019_Q4_(Borisov)

Expected result for https://xtools.wmflabs.org/articleinfo-authorship/de.wikipedia.org/C/2019_Q4_(Borisov)?uselang=en

List of authors of that article (e.g. https://xtools.wmflabs.org/articleinfo-authorship/en.wikipedia.org/Comet).

Actual result:

A fatal error has occurred within XTools. This has been automatically reported, but feel free to file a task on Phabricator (requires a Wikimedia account).
The server said: No route found for "GET /articleinfo-authorship/de.wikipedia.org/C/2019_Q4_(Borisov)" (from "https://xtools.wmflabs.org/articleinfo-authorship/de.wikipedia.org/C/2019_Q4_(Borisov)?uselang=en")

Encoding the slash symbol as %2F also fails: https://xtools.wmflabs.org/articleinfo-authorship/de.wikipedia.org/C%2F2019_Q4_(Borisov)

The requested URL /articleinfo-authorship/de.wikipedia.org/C/2019_Q4_(Borisov) was not found on this server.

XTools version: 3.10.5-36efb8f

Event Timeline

Thanks for the detailed bug report!

Encoding the slash would be the "correct" way to query for that page, since there are other path parameters that could follow the page title. That is obviously broken, and tracked at T208086: XTools doesn't handle URL-escaped slash correctly so I am marking this as a duplicate.

Note also there is a similar bug upstream with the WikiWho API, where we get the authorship data. It's uses the routing [[ https://api.wikiwho.net/de/api/v1.0.0-beta/#!/1_-_Content_per_revision/get_rev_content_article_title_rev_id | /rev_content/{article_title}/{rev_id} ]], so it breaks for pages like https://de.wikipedia.org/wiki/NGC_5544/5 where there is a /number at the end. Encoding also doesn't work, e.g. https://api.wikiwho.net/de/api/v1.0.0-beta/rev_content/NGC%205544%2F5/