Page MenuHomeMiraheze

Assign imported edits to users
Closed, ResolvedPublic

Description

Because of how MediaWiki works as of late, imported pages histories no longer link to users but instead show something like "prefix>username". This is unfortunate because it prevents users from easily reaching the editor's page, talk page, edit count etc., and doesn't assign edits automatically as it used to do before (why the heck they changed this is beyond me).

So what I'm asking is:

  • Make it so imported>Username and it>Username change into the usual links to Username page, talk etc. as we can see in normal histories.
  • Assign the edits to the user's edit count.

Now, the vast majority of users have not created an account on the new wiki yet, but I know for sure the old version of MediaWiki could assign edits to users as soon as they created an account with the same username, so it shouldn't be impossible.

Event Timeline

AmandaCath claimed this task.
AmandaCath subscribed.

This is a feature that you can specifiy yourself when importing pages. When you go to Special:Import there is a checkbox that says “assign edits to local users where the user exists locally” or something like that.

Pages were imported by the staff and I had no control on that.

But it doesn't matter. What I ask for is something MediaWiki doesn't allow anymore but it used to: display editors normally and assigning edits even for those who have not an account yet. Not only most users have not moved here yet, but the vast majority of editors are no longer active and will never move; anyway, I can't wait forever for them all to join before going on with other things.

This is very unfortunate because when we first started moving, MediaWiki worked like that so I promised users they wouldn't lose edits, but it took so long that in the meanwhile MediaWiki updated twice and now no longer automatically links to user but instead it uses that ugly prefix>Username format.

Please just tell me if it's doable with a script or something like that.

This comment was removed by Paladox.

I'm not sure I got what you meant, but it's just like I put it above (I will use my own username for the example): if in the history it's imported>Wedhro it should get assigned to user Wedhro no matter if he got an account on the wiki yet or not. Same for any other prefix, such as it>Wedhro (I used "it" as a prefix for the few pages I imported myself, just because it's mandatory to write something).

Seems that this was possible https://www.mediawiki.org/wiki/Manual:ImportDump.php (using --username-prefix="") but i didn't see that when importing.

MacFan4000 removed AmandaCath as the assignee of this task.

@MacFan4000 why reopen? Paladox comments seems like a “we can’t do anything” response.

John claimed this task.

Yes, doesn't work because it's not an account.

MacFan4000 removed John as the assignee of this task.Nov 2 2018, 17:42

Can I get a final word on this? It would be a gigantic bummer for users to lose all their edits (not to mention the uninformative page histories) after I told them they wouldn't lose anything. And it's not just about my community: how many people would want to move here if they were told there are so many issues? "We can't do anything" won't cut it, guaranteed.

Paladox claimed this task.
Paladox closed this task as Resolved.EditedNov 3 2018, 03:00

I've ran the script and it's now assigned the edits to the users.

I see histories now link to user's pages but edits are not assigned to the user's edit count or contribution history; see for example my own, which stops at june 2018 (I created my account in 2007): https://nonciclopedia.org/w/index.php?title=Speciale:Contributi/Wedhro&offset=&limit=500&target=Wedhro

Two MediaWiki versions ago, instead, edits were assigned to users correctly, even to the ones who weren't subscribed yet. This is the gigantic bummer I was talking about: years of edits gone, after I told people moving the wiki wouldn't have destroyed edit counts.

EDIT: I see that instead of the usual User Page ( talk | contribs ) histories show User Contribs (talk). Can this be fixed?

https://nonciclopedia.org/wiki/Speciale:Contributi/EJake

^^ links them to that user.

So i think it will only work if the user has not registered.

@Wedhro did you edit under a different account on wikia?

I found the problem it's because some of the contributions had a "0" meaning no id. So I'm running a script to fix this problem (hopefully)

@Wedhro did you edit under a different account on wikia?

No, I'm Wedhro on both.

Ok so it works now! (users need to register there account then i can re run the script)

I don't know it it needs time to refresh or something, but my contribs show nothing between March 2008 and June 2018, and my EditCount only shows a tiny fraction of my 32.251 edits.

It is still running and will take quite a while as your wiki is quite large :)

The script has finished running now. It seems to have assigned you all your edit's.

It works for my edit count but now page histories show a plain >Username instead of the links to the user's page, talk etc. For an example see https://nonciclopedia.org/w/index.php?title=Governo_ombra&action=history

EDIT: also, histories are broken for files, it just shows when the maintenance script uploaded it.

That is expected until the users start signing up :) (in which case the script will need to be re run)

As I said, the vast majority of users will never sign up because they're inactive, and the ones who are active will sign up erratically. Before importing a page would just link to the user's pages no matter if it existed or not, I don't understand why all of the sudden this became so difficult.

About files?

Because the id given to these users in the revision are 0. Meaning the user does not exist.

I can make it so that it dosen't show > for the users. But i need your current users to sign up (the ones who are active) so that i can run the script that will correctly assign them the edits. Then i can run the other script that fixes it to remove > from users that don't exist.

Excuse me, but yesterday histories linked to user's pages (including users not signed up yet) and now they don't. Obviously something changed.

Yes because this script cleanups users with no id (so it resets it to have a prefix if the user does not exist) my other script went in and directly changed the text (but did not update any where else) thus that's why you noticed the edits were not assigned to you.

I'd rather have the old behavior because 99,99% of users will never sign up and histories would be barely usable; actual edit counts could be fixed by using the latest script only for the minority of users who will sign up.

The usual way to show edits is Username (links to user's page) (talk | contribs | block), not Username (links to contribs) (talk). Can this be fixed?

Nope. Though at least this is better then it showing the prefix :)

(As the users have a id of 0 meaning they do not exist, internally some where in mw it's changing how it is shown to users depending on if they exist or not)

Ok, it doesn't matter much. What about this bug?

In T3756#72068, @Wedhro wrote:

The same goes for unregistered users.

Um, that im not really sure about.

@John or @Reception123 any ideas ^^?

AmandaCath removed a project: Amanda Catherine.
AmandaCath moved this task from Backlog to Pending answer on the Import board.
AmandaCath unsubscribed.

This was fixed when we reimported the wiki using mw 1.30.

Though i went ahead and created all the users accounts to prevent the problem in the future. (if any of your users turn up and find they cannot create there account) please ask them to create a phab task (and also comment on it that you confirm it is the user please))

Wouldn't that prevent all users from re-creating their account because it already exists? EDIT: ... and therefore open a task here? Please tell me the steps users should follow, exactly.