Last modified: 2014-07-28 16:32:41 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 T70566, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 68566 - Fatal error: Call to a member function getBits() on a non-object in SpecialRevisiondelete.php on line 166
Fatal error: Call to a member function getBits() on a non-object in SpecialRe...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Revision deletion (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-25 13:04 UTC by Aude
Modified: 2014-07-28 16:32 UTC (History)
4 users (show)

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


Attachments

Description Aude 2014-07-25 13:04:58 UTC
happens on test.wikidata, but presumably not on wikipedia / wikidata yet.

Fatal error: Call to a member function getBits() on a non-object at /usr/local/apache/common-local/php-1.24wmf15/includes/specials/SpecialRevisiondelete.php on line 166

URL: http://test.wikidata.org/w/index.php?title=Q22&action=revisiondelete&ids%5B7062%5D=1

Backtrace:
#0 /usr/local/apache/common-local/php-1.24wmf15/includes/specials/SpecialRevisiondelete.php(166): SpecialRevisionDelete::execute()
#1 /usr/local/apache/common-local/php-1.24wmf15/includes/specialpage/SpecialPage.php(382): SpecialRevisionDelete->execute('')
#2 /usr/local/apache/common-local/php-1.24wmf15/includes/actions/RevisiondeleteAction.php(53): SpecialPage->run('')
#3 /usr/local/apache/common-local/php-1.24wmf15/includes/MediaWiki.php(431): RevisiondeleteAction->show()
#4 /usr/local/apache/common-local/php-1.24wmf15/includes/MediaWiki.php(295): MediaWiki->performAction(Object(Article), Object(Title))
Comment 1 Sam Reed (reedy) 2014-07-25 13:09:27 UTC
Line 166:
		$bitfield = $list->current()->getBits();


	/**
	 * Get the current list item, or false if we are at the end
	 * @return Revision
	 */
	public function current() {
		return $this->current;
	}


Needs to deal with current() === false, and probably update the docs too
Comment 2 Aude 2014-07-25 13:26:29 UTC
https://gerrit.wikimedia.org/r/#/c/139277/ appears to be where this broke
Comment 3 Aude 2014-07-25 14:08:28 UTC
the query for the revision is looking in the archive table while the revision is not there (it's in the revision table)
Comment 4 Aude 2014-07-25 14:41:13 UTC
looked again and for querying the revision table, it's doing:

 SELECT rev_id,rev_page,rev_text_id,rev_timestamp,rev_comment,rev_user_text,rev_user,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,rev_content_format,rev_content_model,user_name FROM `revision` INNER JOIN `page` ON ((page_id = rev_page)) LEFT JOIN `user` ON ((rev_user != 0) AND (user_id = rev_user)) WHERE rev_page = '0' AND rev_id = '3481' ORDER BY rev_id DESC;

rev_page is not 0 for any pages in my revision table.

and the revision is not found in the archive table.
Comment 5 Aude 2014-07-25 14:49:03 UTC
the title passed to RevDelRevisionList appears to be Special:RevisionDelete, hence rev_page = 0
Comment 6 Gerrit Notification Bot 2014-07-25 15:58:06 UTC
Change 149325 had a related patch set uploaded by Aude:
Move adjustment of revision delete target in SpecialRevisiondelete to fix fatal

https://gerrit.wikimedia.org/r/149325
Comment 7 Gerrit Notification Bot 2014-07-25 16:07:26 UTC
Change 149325 merged by jenkins-bot:
Move adjustment of revision delete target in SpecialRevisiondelete to fix fatal

https://gerrit.wikimedia.org/r/149325
Comment 8 Kunal Mehta (Legoktm) 2014-07-27 21:41:57 UTC
Was this backported? I just ran into it on testwiki.
Comment 9 Gerrit Notification Bot 2014-07-27 21:44:28 UTC
Change 149783 had a related patch set uploaded by Legoktm:
Move adjustment of revision delete target in SpecialRevisiondelete to fix fatal

https://gerrit.wikimedia.org/r/149783
Comment 10 Kunal Mehta (Legoktm) 2014-07-27 21:47:39 UTC
(In reply to Kunal Mehta (Legoktm) from comment #8)
> Was this backported? I just ran into it on testwiki.

hoo has put this on the SWAT list for tomorrow already, thanks! I uploaded a cherry-pick for it. Re-opening until it's deployed.
Comment 11 Gerrit Notification Bot 2014-07-28 15:37:05 UTC
Change 149783 merged by jenkins-bot:
Move adjustment of revision delete target in SpecialRevisiondelete to fix fatal

https://gerrit.wikimedia.org/r/149783

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


Navigation
Links