Page MenuHomePhabricator

EntityIdHtmlLinkFormatter should account for foreign entities
Closed, ResolvedPublic

Description

Once a property from the foreign repository is used in the statement, its ID is displayed instead of the label, and "Deleted property" note is added. See screen cap below.

Formatter's logic should be adjusted to account for foreign entities.

Details

Related Gerrit Patches:

Related Objects

StatusAssignedTask
Declineddchen
OpenNone
OpenNone
DuplicateNone
OpenNone
ResolvedAbit
DuplicateNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
StalledNone
ResolvedLydia_Pintscher
ResolvedLydia_Pintscher
ResolvedLydia_Pintscher
ResolvedWMDE-leszek
ResolvedWMDE-leszek
ResolvedWMDE-leszek
ResolvedWMDE-leszek

Event Timeline

WMDE-leszek updated the task description. (Show Details)Feb 2 2017, 9:57 AM
daniel added a comment.EditedFeb 6 2017, 6:00 PM

After some code-spelunking with @WMDE-leszek, we found that the issue here is two-fold:

  1. the EntityIdHtmlLinkFormatter needs to get the correct LabelDescriptionLookup - one that can handle multiple repositories. FormatterLabelDescriptionLookupFactory is responsible for providing this instance. In an EntityView, this will be based on an EntityInfoTermLookup, which leads to the problem of creating an EntityInfoBuilder that can handle federation. I filed T157363 for this.
  2. EntityIdHtmlLinkFormatter needs to correctly handle the fact that a) TitleLookup::getTitleForId may return null, and b) Title::exists() returns false for interwiki titles. So, the existance check should be skipped if the title is not local, and getTitleForId returning null should be treated as if the entity was missing (as if exists() returned false).

Change 336240 had a related patch set uploaded (by WMDE-leszek):
EntityIdHtmlLinkFormatter: do not check existence of non-local titles

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

daniel moved this task from Inbox to Push on the User-Daniel board.Feb 6 2017, 6:19 PM

Change 336240 merged by jenkins-bot:
EntityIdHtmlLinkFormatter: do not check existence of non-local titles

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

WMDE-leszek closed this task as Resolved.Mar 8 2017, 4:24 PM
WMDE-leszek claimed this task.
WMDE-leszek moved this task from Monitoring to Done on the Wikidata-Former-Sprint-Board board.