Last modified: 2010-05-15 15:33:55 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 T3476, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 1476 - Category tag on redirect pages does not work
Category tag on redirect pages does not work
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Categories (Other open bugs)
1.4.x
All All
: Normal normal with 6 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
http://test.leuksman.com/index.php/Ca...
: patch
: 1333 2278 3344 (view as bug list)
Depends on: 3370
Blocks: 491
  Show dependency treegraph
 
Reported: 2005-02-06 03:20 UTC by peter green
Modified: 2010-05-15 15:33 UTC (History)
7 users (show)

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


Attachments
Allows category tags on redirect pages to show on category page list,. (934 bytes, patch)
2005-04-14 12:53 UTC, Richard J. Holton
Details

Description peter green 2005-02-06 03:20:15 UTC
on commons i redirected [[Prunus cerasus]] and [[Prunus avium]] to cherry due to
the fact that its pretty much impossible to tell them apart from a photo.

however i wanted to keep the scientific names in [[Category:Rosaceae]] so i
tried putting the category on the redirects.

it seems for some reason mediawiki will not let me do this.
Comment 1 Brion Vibber 2005-02-06 03:21:12 UTC

*** This bug has been marked as a duplicate of 710 ***
Comment 2 peter green 2005-02-06 03:28:49 UTC
NO THIS IS NOT A DUPLICATE OF 710

This bug is about including categories ON redirect pages NOT about redirecting
to categories

redirecting TO category pages is a seperate issue (and also one that we on
commons are desperate to have resolved)
Comment 3 T. Gries 2005-03-02 23:26:59 UTC
(In reply to comment #2)
> NO THIS IS NOT A DUPLICATE OF 710
> 
> This bug is about including categories ON redirect pages NOT about redirecting 
> to categories
> 
> redirecting TO category pages is a seperate issue (and also one that we on
> commons are desperate to have resolved)

I found the following (valid for mediawiki 1.3.7, 1.3.11, but in 1.5 is different):

When you create a new(!) page X with the only content

 #REDIRECT [[foo]]
 [[Category:foo-foo]]

Brion & Co: ATTENTION, this works(!) surprisingly in mediawiki 1.3.7 and 1.3.11: 
page X is a) saved and b) the Category tag is saved and works.

However, when you reopen that page to edit something, the category tag (which is
shown) is automatically deleted by the wiki if you save the page for the second
time.

In CVS version 1.5, the [[Category:foo-foo]] is not even saved, when you create
the page, i.e. immediately cleared.

As I want to have - apparently like Peter - many pages with some short page
titles X with a #REDIRECT _and_ a [[category:Acrocynm]], this is really a
long-felt need. 

Please can someone of the developers have a look into this bugzilla 1476 get it
solved ? TIA
Comment 4 Richard J. Holton 2005-04-14 12:53:33 UTC
Created attachment 419 [details]
Allows category tags on redirect pages to show on category page list,.

The issue here is primarily that of parsing. Changing the category page code to
allow the display of redirect pages is trivial. It's even "trivial" (remove one
line of code) to modify article.php with the results that category tags on
redirect pages are parsed and registered. However, doing so raises some issues:

1. At the same time that the parser detects category tags, it will also detect
other types of links.  Nothing get rendered, but those links show up in other
places: for instance "what links here" at one of the targets of those links
will show the redirect page as a redirect page to the target of the embedded
link. (The page Abc redirects to Foo, but also contains an embedded link to
Bar. At Bar, "What links here" lists Abc as a redirect to Bar). Of course, if
redirect pages don't contain embedded links, there is no problem.
2. The speed of redirect pages will be decreased somewhat. I don't know how
significant this will be. However, as I understand it, redirect pages don't get
cached.

Special code could be written that only parses redirect pages for category
links, if that is deemed necessary.

I'm attaching a patch to 1.4.0 that does this simple change. I've only tested
under 1.5 development , but I don't see any obvious reason it shouldn't work
under 1.4.0.
Comment 5 River Tarnell 2005-04-14 16:41:46 UTC
i'm sure i already fixed this in HEAD. 
 
r1=1.287&r2=1.288&only_with_tag=MAIN&f=h">http://cvs.defau.lt/cvsweb.cgi/phase3/includes/Article.php.diff?r1=1.287&r2=1.288&only_with_tag=MAIN&f=h 
r1=1.16&r2=1.17&f=h&only_with_tag=MAIN">http://cvs.defau.lt/cvsweb.cgi/phase3/includes/CategoryPage.php.diff?r1=1.16&r2=1.17&f=h&only_with_tag=MAIN 
 
is this a different issue?  i'm not sure i want to change 1.4's behaviour 
because it's a non-trivial behavioural change. 
Comment 6 Richard J. Holton 2005-04-14 18:16:41 UTC
(In reply to comment #5)
> i'm sure i already fixed this in HEAD. 
>  

I hadn't noticed this change to article.php. However, when I test the HEAD code
(including your change, but not mine), any content on redirect pages after the
first line gets deleted, including category tags. Perhaps that's by design. The
effect of my additional patch is to remove this restriction.

However, the patch I included above will not, by itself, fix things for 1.4.0.
Should anyone want to use/test, then Kate's changes would also be necessary.
Comment 7 Bobby D. Bryant 2005-05-13 15:43:47 UTC
I would like to encourage adoption of the changes necessary to allow categories
to appear on #REDIRECT pages. Here's an example of why I need them:

I've been working on the WWII order of battle for German divisions. A lot of the
divisions changed their name and/or organization over the course of their
lifetimes, but it seems best to provide one article per division rather than a
separate article for every reorganization and purely cosmetic name change. After
creating such an article all the other aliases can be set up with redirects, so
people can find the article regardless of which name they want to look up. But
putting the categorization on the article sometimes leaves undesirable effects.
For example, [[Category:German panzer divisions]] ends up containing the light
divisions and even some infantry divisions in the list, which will surely baffle
people who haven't read the articles yet. And it can't be fixed by renaming the
articles, because that just moves the problem elsewhere. (E.g., we need a
category for the light divisions listing them as light divisions, and a category
for panzer divisions listing those same divisions as panzer divisions.) If I
could put categories on the redirect "alias" pages, I could clean up the
categories to be clear and precise rather than giving the appearance of
miscategorization as the do now.

Presumably the same issues come up for other classes of articles where redirects
are used to create aliases for things.

Thanks.
Comment 8 Brion Vibber 2005-06-01 00:21:27 UTC
*** Bug 2278 has been marked as a duplicate of this bug. ***
Comment 9 iubito (Sylvain Machefert) 2005-06-09 17:48:45 UTC
I'll try the patch.
I just add a note to explain another situation.
I work with greek page titles. I added them Greece category.
But for my friends who don't read greek, I created pages with latin transcription title, which #REDIRECT to the greek titled page.
I want to add the latin title page in "Greece" category.

Of course, the same problem for cyrillic letters ;)

Some friends work on Greek mythology would like this feature too.
Comment 10 lɛʁi לערי ריינהארט 2005-06-09 19:24:53 UTC
added the URL http://test.leuksman.com/index.php/Category:REDIRECT's

The test wiki FiverAlpha http://test.leuksman.com/ uses (now) MediaWiki: 1.5alpha2 .

To my knowledge the *only* restriction is:
to use *whatever* - categories, templates, interlanguage links (?) -  in the
first line.

Please see also some test cases at
http://test.leuksman.com/index.php/Bugzilla_1476_-_Category_tag_on_redirect_pages_does_not_work

Regards Reinhardt [[user:gangleri]]
Comment 11 Michael Keppler 2005-06-10 20:56:06 UTC
*** Bug 491 has been marked as a duplicate of this bug. ***
Comment 12 Michael Keppler 2005-06-10 21:43:50 UTC
*** Bug 491 has been marked as a duplicate of this bug. ***
Comment 13 lɛʁi לערי ריינהארט 2005-06-11 03:23:34 UTC
*** Bug 1333 has been marked as a duplicate of this bug. ***
Comment 14 Zigger 2005-06-15 20:41:09 UTC
Changing severity back from enhancement to normal, as this was 1.3 functionality
lost in 1.4 (but restored in 1.5 alphas).
Comment 15 Zigger 2005-09-05 23:51:16 UTC
*** Bug 3344 has been marked as a duplicate of this bug. ***
Comment 16 Antoine "hashar" Musso (WMF) 2005-09-06 00:09:43 UTC
Reopening bug. Still no way to categorize a redirect with HEAD.
Comment 17 Richard Gobeille 2005-09-29 21:52:22 UTC
Same thing here, though it appears you can categorize a redirect using HEAD if
you place the category tags on the same line as the redirect.
Comment 18 lɛʁi לערי ריינהארט 2005-12-15 03:18:22 UTC
Please read bug 218 comment 15.
Bug 218: Redirects do not handle named anchors well
Comment 19 Tim Starling 2006-01-06 13:02:59 UTC
This is fixed in CVS currently (to be released in 1.6). You no longer need to
place the category on the same line as the redirect. 
Comment 20 lɛʁi לערי ריינהארט 2006-01-06 15:04:24 UTC
(In reply to comment #19)
> ... You no longer need to
> place the category on the same line as the redirect. 

*note*
Please compare
http://test.leuksman.com/index.php?title=Bugzilla/01476/standard&redirect=no
and
http://test.leuksman.com/index.php?title=Bugzilla/01476/non-standard&redirect=no

The first is a "valid" REDIRECT the second not. However the second example can
be the result of a "bot" optimisation if interwiki links and categories are
placed at the top of the page source.

If this will become an issue please open another bug about changing REDIRECT
recognition.
Comment 21 Rob Church 2006-01-06 15:54:53 UTC
(In reply to comment #20)

If people's bots break wikimarkup, that isn't our problem. They should be coded
not to touch the top line of a redirect page.

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


Navigation
Links