Page MenuHomePhabricator

SpecialItemByTitle must not use Title object to represent remote title.
Closed, ResolvedPublic

Description

SpecialItemByTitle takes a page title from another wiki as one of its parameters. It then uses a Title object to represent this internally - but that is dangerous and misleading. The rules for titles on the local wiki are not the same as the ones on the target wiki. A title containing a : may be in a well known namespace in one but not the other wiki, changing the canonical name utterly.

Instead, SpecialItemByTitle should use a SiteLink object to represent the title and target wiki internally. Title normalization requires an API call to the target wiki, and should thus be optional (or disabled).


Version: unspecified
Severity: normal

Details

Reference
bz44968

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:25 AM
bzimport set Reference to bz44968.
bzimport added a subscriber: Unknown Object (MLST).
daniel created this task.Feb 13 2013, 7:41 PM
  • Bug 44956 has been marked as a duplicate of this bug. ***

It will not be possible to make this optional if a client wiki uses sitelinks in non-mainspace.

(In reply to comment #2)

It will not be possible to make this optional if a client wiki uses sitelinks
in non-mainspace.

Why not? Making it optional just means that no normalization takes place, so the request must then contain the title in already normalized for. Otherwise it will fail. That's inconvenient, but sure possible, no?

We use normalization to be able to match two links. If those two links are not similar then we will have no match. If we use two different ways to normalize the lookup will fail. Yes we can turn off normalization, no it is not a good idea because the user most often will have no idea why a lookup fails.

(Bug 44536, Bug 44968) Use SiteLink instead of Title
://gerrit.wikimedia.org/r/#/c/49066/

fixed link to gerrit change: I1176f839

(In reply to comment #4)

Yes we can turn off normalization, no it is not a good
idea because the user most often will have no idea why a lookup fails.

Normalizing always is nice, but may be a performance problem. If it is a problem, we can turn it off.

Keep in mind that ItemByTitle really isn't supposed to be used by people directly. We could even mark it as unlisted - maybe we should.

Special:ItemByTitle is merely the backend to our title-based addressing scheme. That scheme says that people should be able to just take a Wikipedia URL, replace "wikipedia" by "wikidata", and the link should work. Since the Title in the URL will be in normalized form, this will work fine without normalization (except for redirects).

Verified in Wikidata demo sprint 35-2

Restricted Application added a project: Wikidata. · View Herald TranscriptJan 28 2016, 6:02 PM
Restricted Application added a subscriber: StudiesWorld. · View Herald Transcript