Last modified: 2014-04-29 05:39:53 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 T66573, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 64573 - GettingStarted produces error when saving edits
GettingStarted produces error when saving edits
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
GettingStarted (Other open bugs)
unspecified
All All
: Immediate critical with 1 vote (vote)
: ---
Assigned To: Matthew Flaschen
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-28 22:18 UTC by Steven Walling
Modified: 2014-04-29 05:39 UTC (History)
5 users (show)

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


Attachments

Description Steven Walling 2014-04-28 22:18:40 UTC
Getting "PHP fatal error in /usr/local/apache/common-local/php-1.24wmf1/extensions/GettingStarted/Hooks.php line 463: 
Call to a member function getId() on a non-object" on save
Comment 1 Cyberpower678 2014-04-28 22:22:03 UTC
Yes.  It's causing major problems here, with editing certain pages.
Comment 2 Steven Walling 2014-04-28 22:24:30 UTC
I get this on editing of User:Steven Walling/Sandbox and the Village Pump, but not Wikipedia:Sandbox when logged out or logged in. Bizarre.
Comment 3 Steven Walling 2014-04-28 22:26:19 UTC
https://en.wikipedia.org/w/index.php?title=Polkit&diff=606245346&oldid=605708083 worked which was a GettingStarted page.
Comment 4 Cyberpower678 2014-04-28 22:29:54 UTC
The change to the software has been reverted.
Comment 5 Matthew Flaschen 2014-04-28 22:42:26 UTC
It's not all pages (or at least not all edits), which is presumably why it worked locally and was not reported right away in production.

Reverted in production with https://gerrit.wikimedia.org/r/#/c/130228/ and https://gerrit.wikimedia.org/r/#/c/130229/ .

Apparently $revision can be null for "edits that change nothing" (i.e. null edits), which was recently documented at https://www.mediawiki.org/w/index.php?title=Manual:Hooks/PageContentSaveComplete&diff=923140&oldid=893753 .  WikimediaEvents also has a check for this, which I didn't notice before (https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FWikimediaEvents.git/32f6e1390e8f66674d3d6925f752373bd3d3c3fb/WikimediaEventsHooks.php#L33)

Is it possible all of the edits that showed an error were null edits?

Anyway, the fix seems pretty clear: Do nothing if $revision is null, like WikimediaEvents.

Reopening.  I'll close this when it's fixed in master.
Comment 6 Cyberpower678 2014-04-28 22:45:56 UTC
(In reply to Matthew Flaschen from comment #5)
> It's not all pages (or at least not all edits), which is presumably why it
> worked locally and was not reported right away in production.
> 
> Reverted in production with https://gerrit.wikimedia.org/r/#/c/130228/ and
> https://gerrit.wikimedia.org/r/#/c/130229/ .
> 
> Apparently $revision can be null for "edits that change nothing" (i.e. null
> edits), which was recently documented at
> https://www.mediawiki.org/w/index.php?title=Manual:Hooks/
> PageContentSaveComplete&diff=923140&oldid=893753 .  WikimediaEvents also has
> a check for this, which I didn't notice before
> (https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FWikimediaEvents.git/
> 32f6e1390e8f66674d3d6925f752373bd3d3c3fb/WikimediaEventsHooks.php#L33)
> 
> Is it possible all of the edits that showed an error were null edits?
> 
> Anyway, the fix seems pretty clear: Do nothing if $revision is null, like
> WikimediaEvents.
> 
> Reopening.  I'll close this when it's fixed in master.

no they were not.
Comment 7 Gerrit Notification Bot 2014-04-28 23:29:02 UTC
Change 130247 had a related patch set uploaded by Mattflaschen:
Don't attempt to log if $revision is null

https://gerrit.wikimedia.org/r/130247
Comment 8 Gerrit Notification Bot 2014-04-29 05:22:26 UTC
Change 130247 merged by jenkins-bot:
Don't attempt to log if $revision is null

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

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


Navigation
Links