Page MenuHomePhabricator

The property parser function and mw.wikibase.entity.formatPropertyValues should resolve item redirects when formatting Snak values
Open, HighPublic


When a redirected item is being used in a Statement, both the {{#property:…}} parser function and mw.wikibase.entity.formatPropertyValues don't resolve the redirect but just show the entity id.
It seems more desirable to resolve redirects there and use the label of the redirect target if possible… also that's consistent with how the repo UI works.

Event Timeline

hoo created this task.Feb 17 2016, 10:30 AM
hoo raised the priority of this task from to Needs Triage.
hoo updated the task description. (Show Details)
hoo added subscribers: hoo, Lydia_Pintscher, aude.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptFeb 17 2016, 10:30 AM
hoo set Security to None.Feb 17 2016, 10:32 AM
hoo added a subscriber: TomT0m.
Laddo added a subscriber: Laddo.Feb 17 2016, 1:47 PM
Lydia_Pintscher triaged this task as High priority.Feb 18 2016, 12:15 PM
Lydia_Pintscher moved this task from incoming to ready to go on the Wikidata board.
hoo moved this task from Incoming to To do next on the Wikibase-Lua board.Apr 12 2018, 1:57 PM
Uzume added a subscriber: Uzume.Apr 12 2018, 3:21 PM

This seems partially redundant with T157868, however I am not sure about mw.wikibase.entity.formatPropertyValues. I agree that Wikibase parser functions like {{#property:…}} should probably properly redirect, however, from Scribunto I would rather see mw.wikibase.getEntity and add a mw.wikibase.resolveEntityId implemented or perhaps also have mw.wikibase.getAllStatements and mw.wikibase.getBestStatements redirect.

If mw.wikibase.getEntity, mw.wikibase.getAllStatements and mw.wikibase.getBestStatements redirect one can at least determine which entity ID is the redirection target via returned "id" field.

Uzume added a comment.EditedApr 19 2018, 10:28 AM

This might get resolved by T112658, at least for the parser function.