Page MenuHomePhabricator

wbgetentities shows entity as missing when it is visible through the UI
Closed, ResolvedPublic

Description

Reported on https://www.wikidata.org/wiki/Wikidata:Contact_the_development_team#API_result_is_not_synchronized_with_data_page

Hi, item Q14615170 is opened finely, but API says that it is missing. Action purge does not help. — Ivan A. Krestinin (talk) 05:24, 15 March 2014 (UTC)
Is the same for me. --ValterVB (A) (talk) 07:51, 15 March 2014 (UTC)

https://www.wikidata.org/wiki/Q14615170
https://www.wikidata.org/w/api.php?action=wbgetentities&ids=Q14615170


Version: unspecified
Severity: critical
Whiteboard: u=dev c=backend p=0

Details

Reference
bz62712

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 22 2014, 2:54 AM
bzimport set Reference to bz62712.
bzimport added a subscriber: Unknown Object (MLST).

Looks like the issue is caused by the item not appearing in the Entity Per Page table.
Thus $entityRevisionLookup->getEntityRevision( $entityId ) returns null showing a missing entity in the API and https://www.wikidata.org/wiki/Special:EntityData/Q14615170.json etc.

The question is, why is it not there?!!?!

MariaDB [wikidatawiki_p]> SELECT page_title FROM page LEFT JOIN wb_entity_per_page ON epp_page_id = page_id AND epp_entity_type = 'item' WHERE page_namespace = 0 AND epp_page_id IS NULL;

466 rows in set (38.58 sec)

http://tools.wmflabs.org/hoo/eppInconsistencies

Hoo ran rebuildEntityPerPage.php script and all fixed and confirmed with running the above query again and getting 0 rows! Woo!

This is probably something that should be checked regularl?!