Last modified: 2010-05-15 16:03:54 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T16295, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 14295 - Incorrect parameters for MediaWiki:Blockedtext
Incorrect parameters for MediaWiki:Blockedtext
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
User blocking (Other open bugs)
1.13.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-27 14:49 UTC by Petar Petrov
Modified: 2010-05-15 16:03 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Petar Petrov 2008-05-27 14:49:55 UTC
Let admin A block user account B for 24 hours (autoblock disabled, account creation blocked, if that matters).

Let user B log in and try to edit a page.  The URL is

 http://some.wikipedia.org/w/index.php?title=Some_page&action=edit

User B gets the [[MediaWiki:Blockedtext]] message:

Your user name or IP address has been blocked. 
The block was made by A. The reason given is ''some reason here''. 

Start of block: 13:43, 27 May 2008 
Expiry of block: 13:43, 28 May 2008 
Intended blockee: B 
You can contact A or another administrator to discuss the block. You cannot use the 'e-mail this user' feature unless a valid e-mail address is specified in your account preferences and you have not been blocked from using it. 

Your current IP address is 1.2.3.4, and the block ID is #567. Please include either or both of these in any queries.

--  Everything looks fine.


The problem is when User B tries to edit a specific page version:

 http://some.wikipedia.org/w/index.php?title=Some_page&action=edit&oldid=1690914

The MediaWiki:Blockedtext message is used but some of the message parameter values are not provided correctly:

Your user name or IP address has been blocked. 
The block was made by A. The reason given is ''some reason here''.

Start of block: 14:23, 27 May 2008 
Expiry of block: 14:23, 27 May 2008 
Intended blockee: 
You can contact A or another administrator to discuss the block. You cannot use the 'e-mail this user' feature unless a valid e-mail address is specified in your account preferences and you have not been blocked from using it. 

Your current IP address is 1.2.3.4, and the block ID is #. Please include either or both of these in any queries.


-- Parameters $5 (block ID) and %7 (intended blockee) are missing (empty)
-- Parameter $6 (block expire time) is incorrectly set to $8 (block start time).

For the '''Blockedtext''' message see http://translatewiki.net/wiki/MediaWiki:Blockedtext

See user screenshot at http://bg.wikipedia.org/wiki/Image:WikiBugpng.png (Bulgarian UI).
Comment 1 Huji 2008-05-28 19:21:46 UTC
Nice catch! Actually, nine notices are also shown about calling non-objects etc. I'll try to fix it.
Comment 2 Huji 2008-05-28 19:56:29 UTC
I figured that when a special revision id is given in the edit page url, $user on line 1065 of Title.php will be an instance of StubUser, while when no rev id is given, it is an instance of User. I didn't have time to trace it back and figure where this change occurs; I thought I'd write it here so another dev can follow it.
Comment 3 Huji 2008-06-10 13:39:49 UTC
Looks like someone has fixed this bug without marking it as FIXED.
Comment 4 Max Semenik 2008-07-03 12:19:19 UTC
Fixed by VasilievVV in r35930

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links