Page MenuHomePhabricator

Wikidata item disconnected automaticlly upon temp delete
Closed, DuplicatePublic

Description

Case study / How to reproduce

  1. A page was temporally deleted in Wikipedia - e.g delete followed by restore after very short delay: https://he.wikipedia.org/w/index.php?title=%D7%9E%D7%99%D7%95%D7%97%D7%93:%D7%99%D7%95%D7%9E%D7%A0%D7%99%D7%9D&page=%D7%A6%D7%99%D7%A4%D7%95%D7%A8%D7%94+%D7%9C%D7%95%D7%A8%D7%99%D7%90&uselang=en (deleted at 23:27, 23 July 2016, restored at 23:27, 23 July 2016)
  2. From Wikidata perspective the page was disconnected upon delete: https://www.wikidata.org/w/index.php?title=Q20502799&diff=prev&oldid=359183719 and DID NOT reconnect upon restore (thanks to ValterVB it was reconnected half year later)

Expected

  1. Upon delete, page should disconnect from Wikidata item
  2. Upon restore, it should reconnect to Wikidata item if possible

Possible implementation:

  1. Use ArticleDelete hook to save somewhere the item name of the page being deleted.
  2. Use ArticleUndelete hook to opportunistically reconnect the item