Page MenuHomePhabricator

Update checkStorage.php to not use deprecated Revision::getText
Closed, ResolvedPublic


maintenance/storage/checkStorage.php uses Revision::getText in line 446, but it has been deprecated by wikidata team in favour of getContent()

It should probably set $wgContentHandlerTextFallback to 'serialize' before calling ContentHandler::getContentText(). But why isn't the fallback available as an extra parameter of that method?

Version: 1.21.x
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:40 AM
bzimport set Reference to bz44357.
bzimport added a subscriber: Unknown Object (MLST).

Added a new parameter to ContentHandler::getContentText() in changeset 45936

Updated checkStorage.php in changeset 45937

This last one assumes the text table will always store the serialized object. Needs review by someone familiar with Wikidata contenthandlers.

ContentHandler::getContentText() is really just a stop gap when you need "some kind of text". If you already know that you want the serialized text, use $content->serialize(). (Gerrit Change Id632867207960ba5c25d2b6eaba06f051fb1e681) | change APPROVED and MERGED [by jenkins-bot]