Last modified: 2005-10-12 09:38:21 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 T2706, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 706 - syntax such that a (template) page can be un-categorized, but still categorise pages transcluding it
syntax such that a (template) page can be un-categorized, but still categoris...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Categories (Other open bugs)
unspecified
All All
: Normal enhancement with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: testme
: 1985 (view as bug list)
Depends on:
Blocks: 2376
  Show dependency treegraph
 
Reported: 2004-10-13 07:08 UTC by Gerard Meijsssen
Modified: 2005-10-12 09:38 UTC (History)
5 users (show)

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


Attachments

Description Gerard Meijsssen 2004-10-13 07:08:20 UTC
The definitions of templates are often on a page for maintenance reasons.
Sometimes they are also defined within templates. Both are in special pages (eg
Template: or Wikipedia:) It would be great if it were possible of either not to
display these at all or to have a switch in the definition of the category to
switch these off.
Comment 1 Thue Janus Kristensen 2004-11-04 15:32:31 UTC
See example at
http://en.wikipedia.org/wiki/Category:Candidates_for_speedy_deletion , which
includes unwanted category items like "Template:Delete" and "Wikipedia:Template
messages/All"
Comment 2 Gerard Meijsssen 2004-11-04 17:40:09 UTC
(In reply to comment #0)
> The definitions of templates are often on a page for maintenance reasons.
> Sometimes they are also defined within templates. Both are in special pages (eg
> Template: or Wikipedia:) It would be great if it were possible of either not to
> display these at all or to have a switch in the definition of the category to
> switch these off.

http://nl.wiktionary.org/wiki/Categorie:Woorden_in_het_Hongaars is a page with
words in Hungarian. Hungarian is one of the 200+ languages that have words on
the nl:wiktionary. The category is added from within the template that
attributes a word to a language. These templates are all on a special page
http://nl.wiktionary.org/wiki/WikiWoordenboek:Lijst_van_messages which should
NOT be on this list. 

So I appreciate your point but it is not good for this application of templates.
What I want is NOT a blanket change but the possibility to turn it off by way of
a switch or something.
Comment 3 Wikipedia:en:User:Paddu 2004-11-14 16:09:46 UTC
Probably it is enough to prune out pages not in the main namespace before
displaying the list of pages in a category description page. Selectively
switching on or off the display requires support for more syntax as well as
complicates the process of deciding whether or not to display the link to a page
and this decision needs to be taken for each page in the category. Unless there
are pressing reasons for doing the latter, we should probably follow the [[KISS
principle]].
Comment 4 Wikipedia:en:User:Paddu 2004-11-14 17:01:46 UTC
An alternative proposed in bug 450 is to group the pages by their namespace.
Comment 5 Brion Vibber 2004-11-14 22:39:12 UTC
It is correct and proper for pages marked as belonging in a category to be 
displayed in that category; this will not be changed.

If you want some way to include category tags in templates without 
categorizing the template, please file an enhancement bug to that effect.
Comment 6 Wikipedia:en:User:Paddu 2004-11-18 20:36:57 UTC
OK, changed the summary to match that. Opening a new bug would mean the previous
comments might go unnoticed by those tracking the new bug. Note that some of the
existing comments point towards such a syntax to selectively turn off
categorization.
Comment 7 Rowan Collins [IMSoP] 2004-11-19 01:31:33 UTC
*** Bug 835 has been marked as a duplicate of this bug. ***
Comment 8 Rowan Collins [IMSoP] 2004-11-19 01:44:01 UTC
I've tried to word the summary a bit better - for one thing because it seemed
too close to describing the existing [[:category:foo]] syntax, rather than
what's actually being requested.

I think I favour bug 450 as a better way of making this unnecessary in most
curcumstances, mainly because I'm not quite sure how this would work in
practice. I think there are two situations which have to be considered here:
1) Templates that automatically categorise articles that include them, but which
shouldn't be categorised themselves. (e.g. [[Template:Delete]] should not show
up as a member of [[Category:Cadidates for speedy deletion]], but pages
including it should)
2) Pages that demonstrate the use of templates should be able to do so without
becoming categorised (e.g. [[Wikipedia:List of templates]] or whatever it's
called should not be included in hundreds of categories, even though it uses
templates that have categorisation as an effect)

I'm not quite sure exactly how you'd specify a syntax for (1), since it would be
(AFAIK) the only feature where the content behaved differently on its own from
when included. Basically, the syntax would need to say <if
transcluded>[[Category:foo]]</if>. Which is getting into the realms of bug 364,
almost. But implementing namespace seperation, per bug 450, would mean that this
would only be a problem in the obscure case that you wanted to create
[[Category:Templates using some particular template]] (and really really minded
that [[Template:some particular template]] wasn't included...)

Situation (2) would be marginally easier, and could take a number of forms (some
of these are based on suggestions in bug 835):
* "__NOCAT__" stops the page being included in *any* categories. Simple, but not
very flexible.
* "{{nocat:delete}}" includes [[Template:Delete]] without processing any
category tags. Probably a good middle ground - perhaps the [[Category:...]] tags
could just be scrubbed from the template before it was included?
* "<nocat>" and "</nocat>" delimit a section of an article in which category
tags are not parsed (e.g. "[[Template:Delete]] looks like
<nocat>{{delete}}</nocat>"). Allows you to do it round the edge of a whole block
for example/list pages; but probably adds more complexity than utility.
Comment 9 Wikipedia:en:User:Paddu 2004-12-02 19:49:10 UTC
Clarification of the distinction between bug 706 and bug 835:

(The new syntax proposed below is just an example and might be ugly. I don't
intend to propose that we use this syntax.)

bug 706:
1) [[azbycxdw]] has the normal syntax:
	{{delete}}.
2) [[Template:Delete]] has some new syntax like:
	[[Category:Candidates for speedy deletion|Template:Delete|no_cat]]

In this case [[[Category:Candidates for speedy deletion]] lists
[[Template:Delete]] but not [[azbycxdw]].

bug 835:
1) [[dime]] has the normal syntax:
	[[Category:Currency]]
2) [[dime/bus stop]] has some new syntax like:
	{{:dime|no_cat}}

In this case [[Category:Currency]] lists [[dime]] but not [[dime/bus stop]].

bug 450 offers a (good|bad) solution for bug 706, but not for bug 835 (since
both pages are in the article namespace).

BTW in bug 706 comment 8, case 1 is what is being discussed at bug 706 and case
2 is what is being discussed at bug 835, but for the fact that case 2 of bug 706
comment 8 seems to deal only with transclusion of a page in Template: namespace
but bug 835 attempts to deal with the transcluded page being in any namespace.
Comment 10 Wikipedia:en:User:Paddu 2004-12-02 19:58:31 UTC
Of course I meant:

bug 706:
1) [[azbycxdw]] has the normal syntax:
	{{delete}}.
2) [[Template:Delete]] has some new syntax like:
	[[Category:Candidates for speedy deletion|Template:Delete|no_cat]]

In this case [[[Category:Candidates for speedy deletion]] LISTS [[azbycxdw]] but
DOES NOT LIST [[Template:Delete]].

Sorry for any confusion.
Comment 11 Thue Janus Kristensen 2004-12-12 18:59:01 UTC
Of the proposed solutions I liked these:

1)
The syntax {{delete|nocat}}. Ie, being able to use "|nocat" when using any
template. Seems to fit all purposes.

2)
If for some reason 1) doesn't work, &lt;cat&gt; and &lt;/cat&gt; tags would work
well too.
Comment 12 Wikipedia:en:User:Paddu 2004-12-16 18:58:42 UTC
(In reply to comment #11)
> Of the proposed solutions I liked these:
> 
> 1)
> The syntax {{delete|nocat}}. Ie, being able to use "|nocat" when using any
> template. Seems to fit all purposes.
> 
> 2)
> If for some reason 1) doesn't work, &lt;cat&gt; and &lt;/cat&gt; tags would work
> well too.

Thue, the issue you are talking about is being tracked in bug 835. This bug is
for some syntax *IN* the template so that the template *DOES NOT* get
categorized but other pages transcluding the template *DO* get categorized. What
the solutions you mention solve is bug 835, which asks for some syntax *WHILE
TRANSCLUDING* a template so that the template *DOES* get categorized but the
page transcluding the template *DOES NOT* get categorized.
Comment 13 Wikipedia:en:User:Paddu 2004-12-16 20:25:23 UTC
Probably some processing is required when the template contents are "folded in"
before the real parser sees the entire text. How about inserting "special"
delimiters for start & end of template text while "folding in" and letting the
parser handle these regions specially later on?

e.g. "foo {{templ}} bar" is currently replaced by "foo contents of
Template:templ bar". Instead replace it with "foo {{contents of Template:templ}}
bar". When the parser sees the "{{" (unless it is within <nowiki>) it'd know it
is processing code from within a template (Apart from this, it ignores the
"{{"). It remembers it is within the template until it reaches the *MATCHING* "}}".

If [[Template:templ]] uses [[Category:categ|nocat]], the parser sees "foo
{{contents of
Template:templ that includes [[Category:categ|nocat]] as well as other things}}
bar". After the "{{", category tags with |nocat]] are not ignored until the
*MATCHING* "}}". On the other hand, if [[Category:categ|nocat]] is found ouside
of any {{...}} regions, then the category is ignored, so [[Template:templ]]
wouldn't be categorized.
Comment 14 Rowan Collins [IMSoP] 2004-12-16 21:45:46 UTC
I think we're all rather lost in the confusion between this and bug 835. They're
similar in some ways, but very different in others, so lets not try to apply the
same solutions in both places.

I've tried to simplify the summary:
[old:] "category syntax such that the page the syntax is in ISN'T categorized
but other pages transcluding it ARE"
[new:] "syntax such that a (template) page can be un-categorized, but still
categorise pages transcluding it"
Please don't be confused if I refer to "templates"; I mean "anything that's
being transcluded" NOT "anything in the Template: namespace".

For this bug, we just need a way of saying "if this page is being viewed
normally, don't process categories" - or, for finer control, "... don't process
_this_ category / _these_ categories". This requires a piece of syntax with the
following properties:
A) makes clear to the user what it does (this is actually taxing me at the
moment) - basically, a more elegant way of saying "<if
transcluded>[[Category:Foo]]</if>"; or, for the whole page
"__NO_CATEGORIES_UNLESS_TRANSCLUDED__"
B) when saving (or viewing) the page (*on its own*) causes the parser to ignore
(probably, remove without processing) the associated category tag(s)
C) when transcluding the page, has no effect - e.g. the magic syntax itself is
removed before the text is merged into that of the page actually being saved/viewed

The similarity to bug 835 is mainly the need for a function that strips out the
Category tags in [a particular part of] the source text (property 'B')

For all that, I still haven't thought of a (very likely) situation where sorting
categories by namespace (bug 450) wouldn't provide an entirely usable workaround
without having to invent such a piece of syntax - except for using a template to
add templates to a category, which is surely rare enough that people could just
live with the "extra" template always being listed. [e.g. using {{delete this
template}} to create a [[Category:Templates that need deleting]] would always
leave you with [[Template:Delete this template]] appearing amongst the
category's list of "pages in the Template: namespace"]
Comment 15 flamurai 2005-02-23 19:06:00 UTC
I agree with Rowan. I think bug 450 would solve the problems this bug is trying
to address on the user end. However, I believe it's still necessary to address
bug 835, which presents some of the same technical problems as this bug.
Comment 16 Brion Vibber 2005-04-27 02:21:48 UTC
*** Bug 1985 has been marked as a duplicate of this bug. ***
Comment 17 Rowan Collins [IMSoP] 2005-08-22 18:42:02 UTC
Tim Starling has apparently coded a feature which fits this bug - an
"<includeonly>" tag.
See http://mail.wikipedia.org/pipermail/wikitech-l/2005-August/031123.html
Comment 18 lɛʁi לערי ריינהארט 2005-10-02 16:08:27 UTC
compare with

bug 835: syntax to transclude a page without the containing page inheriting
categories, interlanguage links
Comment 19 Ævar Arnfjörð Bjarmason 2005-10-12 09:38:21 UTC
Resolving this as FIXED.

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


Navigation
Links