Page MenuHomePhabricator

During upgrade to 1.32.2 "php update.php" fails: "UserGroupMembership::insert() needs a positive user ID"
Closed, DuplicatePublic

Description

Hello,

during upgrade procedure "php update.php" fails. Update from 1.30.0 to 1.32.2.
Origin installation was 1.28.0, but many content was imported from historical version of mediawiki.

Checking existence of old default messages...[7528c294ed45d32fd1653a6c] [no req]   UnexpectedValueException from line 169 of /home/www/ci.test/includes/user/UserGroupMembership.php: UserGroupMembership::insert() needs a positive user ID. Did you forget to add your User object to the database before calling addGroup()?
Backtrace:
#0 /home/www/ci.test/includes/user/User.php(3741): UserGroupMembership->insert(boolean)
#1 /home/www/ci.test/maintenance/deleteDefaultMessages.php(83): User->addGroup(string)
#2 /home/www/ci.test/maintenance/update.php(215): DeleteDefaultMessages->execute()
#3 /home/www/ci.test/maintenance/doMaintenance.php(94): UpdateMediaWiki->execute()
#4 /home/www/ci.test/maintenance/update.php(248): require_once(string)
#5 {main}

Event Timeline

Aklapper renamed this task from During upgrade "php update.php" fails (MW 1.32.2) to During upgrade to 1.32.2 "php update.php" fails: "UserGroupMembership::insert() needs a positive user ID".Jun 13 2019, 8:39 AM