Cparle added a comment.

  @Pablo-WMDE this bit of code in WikibaseMediaInfoHooks.php is what triggers 
the error:
  
    $entityId = $this->entityIdFromPageId( $pageId );
    
    $wbRepo = WikibaseRepo::getDefaultInstance();
    $entityLookup = $wbRepo->getEntityLookup();
    $entity = $entityLookup->getEntity( $entityId );
  
  If, for example, I have a page with id 1234 then data for the MediaInfo slot 
on that page is stored as a json blob, and the json will include the field 
`"id": "M1234"`. If then the page id subsequently changes to 1235 the json blob 
isn't updated. The MediaInfo *data* will still be found by `getEntity()` call 
(because the sql used to find it is generated with the condition `'page_id' => 
$entityId->getNumericId()` (see MediaInfoEntityQuery.php::selectRows()), but 
the ids don't match, hence the exception

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

Reply via email to