Cparle added a comment.
The hook approach doesn't work for MediaInfo, becase the hook doesn't fire if a MediaInfo item doesn't exist for a File page - which it doesn't if no structured data has been added to the page AFAICS the introduction of `EntityLookup::getEntity()` has revealed a problem rather than causing one. The problem is that MediaInfo ids for a slot on a page are based on the id of the page, and if the page id changes so does the MediaInfo id IMO @Urbanecm 's patch is fine (providing I can fix the unit tests) for now, but we need to think about the hard-coding of the relationship between page id and MediaInfo id TASK DETAIL https://phabricator.wikimedia.org/T231276 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Cparle Cc: daniel, Pablo-WMDE, Urbanecm, Zoranzoki21, Yann, WMDE-leszek, Lydia_Pintscher, Cparle, Mholloway, Addshore, hashar, ArielGlenn, Lucas_Werkmeister_WMDE, Liuxinyu970226, Aklapper, zeljkofilipin, Hook696, Daryl-TTMG, RomaAmorRoma, 0010318400, E.S.A-Sheild, darthmon_wmde, alaa_wmde, joker88john, DannyS712, CucyNoiD, Nandana, NebulousIris, Gaboe420, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Af420, Ramsey-WMF, Darkminds3113, Bsandipan, Lordiis, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, WSH1906, Lewizho99, Maathavan, _jensen, rosalieper, Jonas, Wikidata-bugs, aude, Ricordisamoa, Jdforrester-WMF, Mbch331, Jay8g, Krenair
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
