Page MenuHomePhabricator

Calling mw.wikibase.entity.formatPropertyValues on Property fails with wikibase-error-invalid-entity-id
Closed, ResolvedPublic

Description

mw.wikibase.getEntityObject(Q161192) gives an nil as an output on wikidata.org, even though visiting that item [[d:Q161192]] does show up with an result.

This is an error on [[d:Wikidata:List of properties/Works]], and the cause behind the single invalid ID error on that page.


Version: master
Severity: normal
Whiteboard: u=dev c=backend p=0

Details

Reference
bz72124

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:58 AM
bzimport set Reference to bz72124.
bzimport added a subscriber: Unknown Object (MLST).

The actual problem is something like:

mw.log(mw.wikibase.getEntityObject('P447'):formatPropertyValues('P1'))
The ID entered is unknown to the system. Please use a valid entity ID.

The example given above works, btw:

mw.log(mw.wikibase.getEntityObject('Q161192'):getLabel())
007 Legends

I had another look, the thing seen here was simply that the template call {{List of properties/Row|id=444|example-subject=Q161192|example-object=7.0/10}} passed "7.0/10" as entity id, which is clearly an invalid value.

But still there's the other bug I discovered...

Change 170504 had a related patch set uploaded by Hoo man:
Make mw.wikibase.entity.formatPropertyValues work for non-items

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

Change 170504 merged by jenkins-bot:
Make mw.wikibase.entity.formatPropertyValues work for non-items

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