Last modified: 2013-01-13 03:25:21 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 87 - Category tags produce ugly whitespace
Category tags produce ugly whitespace
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Normal normal with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: need-parsertest, parser, patch, patch-reviewed
: 101 1223 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-08-16 06:00 UTC by Timwi
Modified: 2013-01-13 03:25 UTC (History)
5 users (show)

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


Attachments
Patch to eliminate ugly whitespace for categories (410 bytes, patch)
2005-01-27 20:22 UTC, Richard J. Holton
Details
fixes the bug (patch runs in correct direction, too!) (397 bytes, patch)
2005-04-01 17:36 UTC, Richard J. Holton
Details

Description Timwi 2004-08-16 06:00:10 UTC
BUG MIGRATED FROM SOURCEFORGE
http://sourceforge.net/tracker/index.php?func=detail&aid=963423&group_id=34373&atid=411192
Originally submitted by Nobody/Anonymous - nobody  2004-05-31 08:39


[[Category: tags create blank lines if they exist
solely on one line in some cases. Examples:
* http://en.wikipedia.org/wiki/Universal_gas_equation -
interwiki links creating blank line at top, category
tag creating blank tag at bottom
*
http://en.wikipedia.org/wiki/List_of_AL_Gold_Glove_Winners_at_Shortstop
- cat tags creating blank line at top

Thanks! :)

------------------------- Additional comments ------------------------
Date: 2004-05-31 09:23
Sender: nobody
Logged In: NO 

This seems to be a consequence of the Cologne Blue skin not
showing up categories visibly in an article, while Monobook
does.
-------------------------------------------------
Date: 2004-07-03 04:14
Sender: nobody
Logged In: NO 

Agreed, this is quite bothersome, I hope this will be fixed.
 It's especially distracting when the tags are on the top of
the page and create superfluous space between the title and
intro.  I've been moving tags to the bottom to reduce the
visibility of this, but this should really be dealt with
automatically.
Comment 1 Addicted 2004-08-16 12:19:13 UTC
*** Bug 101 has been marked as a duplicate of this bug. ***
Comment 2 Wikipedia:en:User:Paddu 2004-11-14 16:08:10 UTC
This bug is said to be only in the Cologne Blue skin, so how could it be parser
related?
Comment 3 Zigger 2004-12-08 13:58:00 UTC
This bug also occurs in monobook.  Probably related to bug 833.
Comment 4 Brion Vibber 2004-12-29 03:30:02 UTC
*** Bug 1223 has been marked as a duplicate of this bug. ***
Comment 5 Antoine "hashar" Musso (WMF) 2005-01-27 01:04:41 UTC
I believe this bug got fixed somehow in the 1.4beta serie.
Please have a look at it on your local installation or
on http://en.wikipedia.org/ which is using 1.4beta .

If the issue is still happenning, please submit a screenshot
of it and the mediawiki version (in [[Special:Version]] ).
Comment 6 grendelkhan 2005-01-27 18:45:22 UTC
It's not fixed. See [[Albert Einstein]]. Interwiki tags don't make whitespace,
but category tags do. I'll get a screenshot when I'm on a computer that doesn't
suck.
Comment 7 Richard J. Holton 2005-01-27 20:22:00 UTC
Created attachment 233 [details]
Patch to eliminate ugly whitespace for categories

This patch should do the trick. Just borrowed some code from the interwiki link
processing.
Comment 8 Ævar Arnfjörð Bjarmason 2005-04-01 16:05:38 UTC
The patch by Richard J. Holton appers to have been applied to HEAD by gabriel
wicke, but the problem persists.
Comment 9 Richard J. Holton 2005-04-01 16:39:15 UTC
(In reply to comment #8)
Changes applied to HEAD are not currently available in any released
product...only in 1.5 development.

Are you testing a 1.5 installation, or looking at the live Wikipedia or a sister
project?
Comment 10 Ævar Arnfjörð Bjarmason 2005-04-01 16:41:15 UTC
Testing it in HEAD of course.
Comment 11 Richard J. Holton 2005-04-01 17:06:32 UTC
Actually, as far as I can tell, the patch has not been applied to HEAD / MAIN.
Comment 12 Richard J. Holton 2005-04-01 17:18:48 UTC
Awww..Crap! My bad. The patch is running the wrong way! The line it's set to add
should be deleted. The two it's set to delete should be added.
Comment 13 Richard J. Holton 2005-04-01 17:36:29 UTC
Created attachment 397 [details]
fixes the bug (patch runs in correct direction, too!)

See the corrected patch.
Comment 14 Ævar Arnfjörð Bjarmason 2005-04-01 17:43:47 UTC
I already tried the previous patch with /patch -R/ (reverses the patch) and I
also tried this one too and the problem persists, I'm using a copy of the Albert
Einstein article from en. to test it, the outputted HTML is (not that I added
some more categories):

""""""""""""""""""""""""""""""
[...]
</li><li> <a href="http://www.economist.com/displaystory.cfm?story_id=3518580"
class='external text' title="http://www.economist.com/displaystory.cfm?story
id=3518580" rel="nofollow">Economist article "100 years of Einstein"</a>
</li></ul>
<p><br />

</p><p><br />
</p><p><br />
</p><p><br />
</p><p><br />
</p><p><br />
</p><p><br /> <!----- This is the category whitespace in question ----> 
</p><p><br />
</p><p><br />
</p><p><br />
</p><p><br />
</p><p><br />
</p><div class="printfooter">
Retrieved from "<a
href="http://localhost/mw/HEAD/wiki/Albert_Einstein">http://localhost/mw/HEAD/wiki/Albert_Einstein</a>"</div>
	    <div id="catlinks">
""""""""""""""""""""""""""""""
Comment 15 Tomer Chachamu 2005-04-01 18:12:18 UTC
Works perfectly for me. I suggest just opening the file includes/Parser.php and
going to line 1294. Here's what the code should look like (with 5 lines before
and 5 lines after which should help you locate the change)

                                        } else {
                                                $sortkey = $text;
                                        }
                                        $wgLinkCache->addCategoryLinkObj( $nt,
$sortkey );
                                        $this->mOutput->addCategoryLink( $t );
                                        $tmp = $prefix . $trail ;
                                        $s .= (trim($tmp) == '')? '': $tmp;
                                        
                                        wfProfileOut( "$fname-category" );
                                        continue;
                                }
                        }

It works well for me.
Comment 16 Ævar Arnfjörð Bjarmason 2005-04-09 00:33:48 UTC
I probably made some kind of error when testing it previously, anyway I went
over it again and it seems to work for me™, I've committed it to REL1_4 and
HEAD, sorry for the mistake and thanks for the patch.
Comment 17 River Tarnell 2005-04-09 00:42:27 UTC
Checked in to CVS.  Information at: 
 
  http://mail.wikimedia.org/pipermail/mediawiki-cvs/2005-April/007528.html 
 
Please be aware that changes won't show up on Wikipedia until the new 
code is put live, which can take hours or days, often up to a week. 
 
Comment 18 Amgine 2013-01-13 03:25:21 UTC
<historic hug to River> No particular reason, just warm memories.

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


Navigation
Links