Smalyshev added a comment.
Looking further into this, we can check if the page has the slot with this: 1. Create WikiPage from page ID/title 2. $revisionRecord = $page->getRevisionRecord() 3. $mediaInfoSlot = $revisionRecord ->getSlot( MediaInfo::ENTITY_TYPE ) But it is still unclear what one would use to obtain MediaInfoId. The scheme is that MediaInfoId is derived from page ID, but I am not sure if there's a generic handler that implements it, or it's all ad-hoc. Additional complication is that SqlEntityIdPager is supposed to work with multiple entity Ids in batches, and if we fetch from namespace like File where some pages may not have slots that we're looking for then both composing the query to get both non-slot and slot-based IDs, and the batching of those, may become a bit complicated... TASK DETAIL https://phabricator.wikimedia.org/T222299 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Smalyshev Cc: Jdforrester-WMF, matthiasmullie, Cparle, daniel, Lucas_Werkmeister_WMDE, Tpt, Addshore, Ramsey-WMF, Aklapper, Smalyshev, alaa_wmde, Nandana, JKSTNK, Lahi, PDrouin-WMF, Gq86, E1presidente, Anooprao, SandraF_WMF, GoranSMilovanovic, QZanden, EBjune, Tramullas, Acer, merbst, LawExplorer, Salgo60, Silverfish, Poyekhali, _jensen, rosalieper, Jonas, Xmlizer, Susannaanas, Wong128hk, Jane023, jkroll, Wikidata-bugs, Jdouglas, Base, aude, Tobias1984, El_Grafo, Dinoguy1000, Manybubbles, Ricordisamoa, Wesalius, Lydia_Pintscher, Fabrice_Florin, Raymond, Steinsplitter, Mbch331, Keegan
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs