Bug #35028 The "My contributions" Wiki page does not list any pages
Submitted: 4 Mar 2008 5:13 Modified: 27 Feb 2009 16:51
Reporter: Lenz Grimmer Email Updates:
Status: Closed Impact on me:
Category:MySQL Websites: MySQLForge Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[4 Mar 2008 5:13] Lenz Grimmer
My profile page on the Forge displays all my Wiki pages I created or edited:

However, the "My contributions" Wiki page is empty, when I enter the Wiki with the same login: http://forge1.mysql.com/wiki/Special:Contributions/Lenz_Grimmer

How to repeat:
Log in as a user that has created Wiki content, observe the difference between what MediaWiki and the rest of Forge know about your Wiki contributions.
[4 Mar 2008 5:45] Valeriy Kravchuk
Thank you for a bug report.
[4 Mar 2008 7:03] Giuseppe Maxia
Jay, some additional notes:

* the "my contributions" page lists only changes that I made in the new Forge;

* the "wiki/created edited content" of my profile in the main Forge lists all
  my contributions.
[11 Mar 2008 0:58] Jay Pipes

So, I tracked down this bug to an odd behaviour in MediaWiki.  The relevant code is in /w/includes/SpecialContributions.php.  Amazingly, instead of using the user ID of the MediaWiki user (which stays constant) Mediawiki uses the *user name* to fetch the contributions list. The SQL which is generated by Mediawiki is the following:

SELECT page_namespace,page_title,page_is_new,page_latest, rev_id,rev_page,rev_text_id,rev_timestamp,rev_comment,rev_minor_edit,rev_user,rev_user_text, rev_deleted FROM `mw_page`,`mw_revision` FORCE INDEX (usertext_timestamp) WHERE page_id=rev_page AND rev_user_text='XXX' ORDER BY rev_timestamp DESC LIMIT 50;

where XXX is the logged-in user's user name.  So, because the user names changed due to the single-signon needs, the user's old contributions are lost until they go to "edit profile" in the forge and set their display name back to their old MediaWiki user name.

For instance, Lenz, if you logged into the Forge, clicked "edit profile" and set your display name from Lenz Grimmer to Lgrimmer (the munged MediaWiki user name) and went back to the wiki User Contributions page, you will see your contributions...

On the main forge user's profile page, the contributions displayed are correctly queried using the user_id field, which remains constant.

I will possibly fix this bug later, but for irght now, I can't be bothered to fix MediaWiki.
[27 Feb 2009 16:51] Lenz Grimmer
This has actually been fixed in the meanwhile.