Sender | Message | Time |
---|---|---|
18 Sep 2020 | ||
rundg | and that key is only used in includes/jobqueue/jobs/DoubleRedirectJob.php | 18:57:39 |
rundg | https://gerrit.wikimedia.org/g/mediawiki/core/+/785dc0ee3aa54f59b826ae622eb5dee390086642/includes/jobqueue/jobs/DoubleRedirectJob.php#242 | 19:00:31 |
rundg | One thing I did was completely drop the database and restore it from a backup (because new tables had been introduced during an attempted update with SMW enabled) | 19:02:48 |
rundg | My thinking is "Don't introduce any changes until after the upgrade process can be completeed" | 19:03:19 |
rundg | There are apparently 56 entries in revision where rev_user_text is 'Redirect fixer' (rev_user = 7425) | 19:07:02 |
rundg | But no record in user where user_id = 7425 | 19:07:15 |
rundg | If I
and re-run | 20:42:21 |
rundg | So I guess I need to write some code around MigrateActors::addActorsForRows | 20:43:07 |
19 Sep 2020 | ||
tgr | In reply to @hexmode:matrix.orgPretty sure that never worked. | 00:31:53 |
hexmode | maybe only after saveSettings()? | 00:32:31 |
hexmode | but whatever I was doing before isn't working now | 00:32:45 |
tgr | No. If you load a user with non-existent name, it will end up with ID 0. Hopefully you wouldn't have been able to save that, but even if it worked, it would have meant a very different thing from what you intended. | 00:34:47 |
tgr | In any case, user management hasn't really changed when AuthManager was introduced, apart from some password-related aspects | 00:35:32 |
tgr | load, save, addToDatabase etc. does the same thing they did before | 00:35:53 |
hexmode | createUser seems to have what it does on the tin, though. | 00:35:58 |
hexmode | it seems i missed it | 00:36:20 |
tgr | I have no idea what the difference is between createUser and addToDatabase, TBH | 00:36:29 |
tgr | apart from some esoteric transaction management details | 00:36:47 |
hexmode | looking at the code createUser seems a little more high level | 00:37:09 |
tgr | Anyway the proper method to create a new user would be to write an AuthenticationProvider. | 00:37:45 |
tgr | The slightly less proper one would be to call AuthManager::autoCreateUser. | 00:38:14 |
tgr | Manual user creation will mess up all kinds of internal state, like site statistics. | 00:38:35 |
tgr | (And newSystemUser is for creating an account that is impossible to log into. You can probably abuse it for creating normal users, but it's not safe.) | 00:40:16 |
tgr | freephile: the redirect fixer is a system user that dereferences double redirects. It's the result of either running fixDoubleRedirects.php or enabling $wgFixDoubleRedirects. | 00:44:11 |
tgr | probably your best bet is to get into a shell and run User::createNew( 'Redirect fixer', [ 'id' => 7425 ] ) | 00:47:23 |
20 Sep 2020 | ||
rundg |
I tried with
| 13:56:43 |
21 Sep 2020 | ||
nikerabbit | In reply to @freephile:matrix.orgYeah that is a common(?) issue. You have to use eval.php in this case. https://phabricator.wikimedia.org/T208304 | 07:47:06 |
rundg | Thanks nikerabbit . That worked
| 15:42:32 |
rundg | Now I get to see if that will cure the upgrade process... in about 9 hours because that's how long it takes to redo. | 15:44:06 |
hexmode | In reply to @tgr:matrix.org tgr: thanks for the help. I'm seeing two slightly different users in the db which is why, I think I had the code working in a deferred update (before) instead of immediately (like I was trying to do now). Probably the account was being created in the proper way before and I only glued it to the SSO afterward in the deferred update. But, I didn't have that documented, so when I looked at it now, it looked all confusing and smelly. TY for the pointers. | 18:20:25 |