Last modified: 2006-07-17 18:35:10 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 T8293, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 6293 - Transcluding text with categories causes the page to become part of that category
Transcluding text with categories causes the page to become part of that cate...
Status: RESOLVED DUPLICATE of bug 835
Product: MediaWiki
Classification: Unclassified
Categories (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-06-13 11:35 UTC by Steve Bennett
Modified: 2006-07-17 18:35 UTC (History)
1 user (show)

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


Attachments

Description Steve Bennett 2006-06-13 11:35:43 UTC
This has almost certainly been raised before, but I can't find it.
Simply put, given page X which contains the text [[Category:Foo]], and page Y
which contains {{X}}, then page Y behaves as if it contained [[Category:Foo]].
This is often, but not always, a good thing. In the cases that it is not, the
only workaround (putting <nowiki> around the original [[Category:Foo]]) is a bit
awkward, and may not always be possible if the page is protected. One case when
it can be annoying is if an official policy page on wikipedia gets transcluded
into someone's user space, for example.

Possible suggestions:
* Tag categories as only applying to pages in a certain namespace
({{catnamespace|Wikipedia}} on category page)
* Allow categories to explicitly disclaim certain entries ({{exclude:X}} on
category page)
* Allow categories to exclude all transcluded references (__NOTRANSCLUDE__ on
category page)
* Allow pages to de-categorise. In the example above, [[Remove:Category:Foo]] on
page Y.
* Allow "static" transclusions, whereby no categories are transcluded (or
possibly work in one direction only), and possibly even "what links here" links
are not carried over. Somewhat of a blend of subst: and normal transclusion,
except that categories are handled specially: {{static:X}} on page Y.
Comment 1 Rob Church 2006-06-13 11:48:50 UTC
Wrap the categories in the page with <noinclude> tags.
Comment 2 Steve Bennett 2006-06-13 12:08:03 UTC
[ack, typo above: I meant <noinclude> not <nowiki>...]

Counter example:
http://en.wikipedia.org/wiki/Wikipedia:Template_messages/Project_namespace
(note all the categories this page supposedly belongs to)

It transcludes the template {{policy}}, which has a category in it. If we
wrapped that [[Category:]] ref in <noinclude>, then it would not work in the
right places (notably, wikipedia policy pages).
Solutions 2, 4 and 5 above would work here.

(noinclude also doesn't help in cases where the original page can't be modified,
such as for protected templates)
Comment 3 Brion Vibber 2006-06-13 18:50:49 UTC
Then ask an admin to change the template.
Comment 4 Borgx 2006-06-15 02:08:26 UTC
Hi. See also bug 4407 and its workaround using ParserFunctions
Comment 5 Steve Bennett 2006-06-15 07:50:49 UTC
Thanks. That, and splitting the template into two halves seem like the best
(only) workarounds. The two-halves solution isn't necessarily bad, if it was
standardised:

{{delete}} transcludes {{delete-nocat}} and just adds [[Category:...]]
Then, in most cases, people would add {{delete}}, but when people just want to
display the category, they would use {{delete-nocat}}.
Comment 6 Phil Boswell 2006-07-17 15:58:35 UTC
*** Bug 6720 has been marked as a duplicate of this bug. ***
Comment 7 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-07-17 18:35:10 UTC

*** This bug has been marked as a duplicate of 835 ***

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


Navigation
Links