Page MenuHomePhabricator

edit.php gives the wrong error message for protected pages
Closed, DuplicatePublic


edit.php gives the wrong error message.
Here the problem was the page in question is protected.
It should say "Page is protected" not "... is older ...".
In fact as you see I used cat, so it has little way to know if it is older.

$ cat file | php edit.php Template:C
[e7254eaf9ba8103aafe9fa00] [no req]   MWException from line 4060 of /home/jidanni/mediawiki/includes/user/User.php: CAS update failed on user_touched for user ID '293' (read from replica); the version of the user to be saved is older than the current version.
#0 /home/jidanni/mediawiki/includes/user/User.php(736): User->saveSettings()
#1 /home/jidanni/mediawiki/maintenance/edit.php(57): User::newSystemUser(string, array)
#2 /home/jidanni/mediawiki/maintenance/doMaintenance.php(95): EditCLI->execute()
#3 /home/jidanni/mediawiki/maintenance/edit.php(107): require_once(string)
#4 {main}

Trying again with --user WikiSysop works, proving the problem has
nothing to do with 'older'.

$ cat file | php edit.php --user WikiSysop Template:C
Saving... done

Event Timeline

Does it give the error every time if you don't use a Sysop user

I do note that the first error is actually an exception... Not a "wrong error" -- The error is there because there's a problem

All I know is this is what happens when I try it on protected pages. I didn't try it on non-protected pages.
I see user_token = '* INVALID *':

CAS update failed on user_touched for user ID '293' in the log is a pretty common one. See e.g. T95839,T129069,T171003,T124414