Page MenuHomePhabricator

UserEditTracker attempts to initialize edit count in read only mode
Closed, ResolvedPublic

Description

The method UserEditTracker::getUserEditCount (as well as the old User class logic it replaced) calculates the user's edit count and writes it to the database if it was not computed yet. However, it attempts this write even if MediaWiki is in read-only mode. This causes errors, as the method is called on read requests as well.

UserEditTracker should only attempt to write to the DB if MediaWiki is not read-only.

Event Timeline

Change 618547 had a related patch set uploaded (by TK-999; owner: TK-999):
[mediawiki/core@master] UserEditTracker: Do not try to initialize edit count in read-only mode

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

Change 618547 merged by jenkins-bot:
[mediawiki/core@master] UserEditTracker: Do not try to initialize edit count in read-only mode

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

Looks like it's been on WMF production without issues, so I'll close this. Thanks!

TK-999 claimed this task.