Last modified: 2014-06-23 16:06:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T54613, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52613 - Upgrading to 1.21, populateRevisionSha1.php fails to populate rev_sha1 fields
Upgrading to 1.21, populateRevisionSha1.php fails to populate rev_sha1 fields
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
1.21.x
PC Linux
: High major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-07 15:29 UTC by zsaigol
Modified: 2014-06-23 16:06 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description zsaigol 2013-08-07 15:29:11 UTC
When upgrading from Mediawiki 1.15 to 1.21, running the update.php script produced the following output:

.....
Populating rev_sha1 column
...doing rev_id from 1 to 200
Data of revision with rev_id=1 unavailable!
Data of revision with rev_id=2 unavailable!
Data of revision with rev_id=3 unavailable!
Data of revision with rev_id=4 unavailable!
Data of revision with rev_id=5 unavailable!
Data of revision with rev_id=6 unavailable!

... and so on for every row in the table.

It looks like a bug where populateRevisionSha1.php calls new Revision( $row ), and then calls $rev->getSerializedData(), but within the Revision object the mText field is still null.

I fixed this (I think) by changing Revision.php, line 541 to be 
   $this->mText = $this->loadText();
avoiding the lazy extraction. And then re-running the script using
   php populateRevisionSha1.php --force
Comment 1 Andre Klapper 2013-08-08 08:16:30 UTC
Thanks for taking the time to report this and even providing a potential fix for mediawiki/core/includes/Revision.php !
Comment 2 db [inactive,noenotif] 2013-08-09 10:02:26 UTC
Sounds like fixed with Gerrit change #77903
Comment 3 Svick 2013-08-09 10:53:49 UTC
Yeah, I agree, this is the same bug my change fixed.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links