Last modified: 2012-04-12 13:55:39 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 T31889, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29889 - <includeonly> fails to include <noinclude>, and instead it is parsed and EXCLUDED
<includeonly> fails to include <noinclude>, and instead it is parsed and EXCL...
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.16.x
All All
: Normal major with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-14 01:52 UTC by badon
Modified: 2012-04-12 13:55 UTC (History)
2 users (show)

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


Attachments

Description badon 2011-07-14 01:52:23 UTC
This bug causes massive proliferation of categories in places they're not supposed to be, which breaks pretty much everything that depends on accurate categories.

Similar bug here: https://bugzilla.wikimedia.org/show_bug.cgi?id=5210

An example:

<noinclude>
This is the "Image" template. It does stuff to image pages.
</noinclude>

<includeonly>
Here I'm doing a bunch of stuff to the image page.

<noinclude>
<!-- If a page using this template is embedded within another page, noinclude will prevent that page from unintentionally becoming part of the Images category. This category, and everything else within the noinclude tags and the tags themselves, are supposed to be transcluded wherever this template is used. But, instead, the parser skips it, even though it is within includeonly or onlyinclude tags -->
[[Category:Images]]
</noinclude>
</includeonly>
Comment 1 P.Copp 2011-07-14 20:56:42 UTC
If I understand you correctly you're requesting a way to include some text on the including page, but not on a page including the including page. That's currently not possible. It would require some kind of <includeonce> tag or parser function, that doesn't exist and probably never will.

Marking as duplicate of bug 11831 where the same thing has been requested. Please reopen, if I somehow got you wrong.

*** This bug has been marked as a duplicate of bug 11831 ***
Comment 2 badon 2011-07-14 22:18:01 UTC
The other bug is a feature request. This is a distinct, isolated bug that may also happen to eliminate the need for that other feature request. Solving this  bug would not require a special tag or any new features like that. It would simply require not parsing nested tags that are supposed to be simply transcluded, and not parsed. That should resolve the problem quite cleanly.

Stated more simply, the parser should only parse the outermost level of nested tags. Anything deeper inside should be passed along as text without being touched, and obviously stripping out the tags that have already been processed. Here's a simple, specific example:

<includeonly>

Everything here, and below, should be transcluded on photos of horses to make it easy to categorize them.

<noinclude>

[[Category:Horses]] should go on pictures of horses, but not the article about Transportation where horse pictures may be transcluded.

</noinclude>
</includeonly>

The above example template would be transcluded to a horse photo page to make it a part of the Horses category. If the horse photo is then itself transcluded to an article about Transportation, the Transportation article should NOT become a part of the Horses category. 

Images are something that frequently get transcluded in other pages. With the current buggy behavior, if you want to assign images to categories, subsequently trying to USE the images via transclusion will result in every page the image is used on becoming a part of the same category as the image. In other words, there's no way to both categorize images, AND then use them with transclusion, because the parser screws it up and pollutes the category where the image is located.

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


Navigation
Links