Last modified: 2014-11-18 18:07:24 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 5210 - preload parser should parse <noinclude> (as well as <includeonly>)
preload parser should parse <noinclude> (as well as <includeonly>)
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
1.14.x
All All
: Normal normal with 11 votes (vote)
: ---
Assigned To: Trevor Parscal
http://meta.wikimedia.org/wiki/Inputbox
:
: 13932 16733 17723 21472 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-03-09 03:22 UTC by Sherman Boyd
Modified: 2014-11-18 18:07 UTC (History)
15 users (show)

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


Attachments

Description Sherman Boyd 2006-03-09 03:22:06 UTC
When using the inputbox.php extension to create with preload the script should
parse <noinclude> and <includeonly>.  For example if the template includes:

<noinclude>[[Category:Scategory]]</noinclude>

Then the expected behavior is that the new page would not include the above line.

If the template contains: 

<includeonly>[[Category:Scategory]]</includeonly>

In that case I would expect that [[Category:Scategory]] would be included in the
new page, sans the <includeonly> tags.

The problem that I am encountering is that I want to use inputbox to create
templates for users that have categories built in.  However I can't have these
templates showing up in the categories.

About <noinclude> <includeonly>:
http://mail.wikipedia.org/pipermail/wikitech-l/2005-August/031123.html

I'm using inputbox 1.19 as I had problems with 1.20.  See:
http://meta.wikimedia.org/wiki/Help_talk:Inputbox#error_message

Anyway thanks for your help!  If there is anything I can do please let me know.
Comment 1 Chris 2006-06-13 05:56:48 UTC
I am having a similar problem with this, the includeonly works find, but
noinclude does not work. I mentioned it here:

http://meta.wikimedia.org/wiki/Help_talk:Inputbox#noinclude_and_includeonly
Comment 2 Mike Peel 2007-06-16 11:38:14 UTC
I have also encountered this issue on Wikipedia; the templates substituted by this function cannot contain any content other than that to be substituted, meaning that the templates can neither be categorized or documented without that categorization/documentation being included on the substituted page.

For an example, see http://en.wikipedia.org/w/index.php?action=edit&preload=Template%3AInfobox%20Planet&editintro=&title=Wikipedia%3AAbuse+reports%2F10.0.0.1&create=Report+IP - any text between <noinclude>...</noinclude> should not have appeared there.
Comment 3 Jamie Hari 2007-10-10 05:31:03 UTC
Today, I installed the latest version (as of Oct 10, 2007) of this extension and MediaWiki 1.11.0 and I am experiencing this issue as well.

Everything in the page to be preloaded is included, regardless if you use either <noinclude> or <includeonly>.


Oddly enough, on one of my other wikis does NOT experience this issue:

http://en.marveldatabase.com/index.php?title=Foo&action=edit&section=&preload=Template:Character%20Template

pulls from:

http://en.marveldatabase.com/index.php?title=Template:Character%20Template&action=edit

where I have lots of other crap between <noinclude> tags...


The working wiki uses older versions of both the extension and MediaWiki (1.10alpha). It is possible that Wikia has hacked up a solution to this problem... I have emailed them to investigate and post their findings here.
Comment 4 Brion Vibber 2008-05-06 23:25:41 UTC
*** Bug 13932 has been marked as a duplicate of this bug. ***
Comment 5 Splarka 2008-05-06 23:28:49 UTC
Preload is not actually part of the inputbox extension, change should be made in core. small mod to summary.

Comment 6 Splarka 2008-05-06 23:46:08 UTC
(In reply to comment #3)
> It is possible that Wikia has hacked up a solution to this
> problem... I have emailed them to investigate and post their findings here.

Yep, they do, Datrio modified it at my request. Here are the relevant lines:

                                         $text = preg_replace( '~</?includeonly>~', '', $text );
                                         // Remove <noinclude> - Datrio
                                         $text = preg_replace( '/<noinclude>.*<\/noinclude>/', '', $text );
                                         return $text;

But this maybe should be done via the actual parser. Possibly the includeonly/noinclude/onlyinclude tags should be stripped/parsed in a function that both preload and the wiki parser can call on?
Comment 7 Daniel Brice 2008-10-22 16:47:08 UTC
When fixing this bug, please ensure that we can still in some way still actually add <noinclude> and <includeonly> tags to the new page.

One such way around it maybe allowing this form where if the tag is interrupted it does not get parsed (however quite ugly):

<<includeonly></includeonly>includeonly>This text will be placed on the new page and will be surrounded by includeonly tags</<includeonly></includeonly>includeonly>

<<includeonly></includeonly>noinclude>This text will be placed on the new page and will be surrounded by noinclude tags</<includeonly></includeonly>noinclude>

Another suggestion is to add another preload tag that overrides any includeonly/noinclude:

<noinclude>This text will not be in the new page</noinclude><preload><includeonly>This text will be placed on the new page and will be surrounded by includeonly tags</includeonly></preload>

<noinclude>This text will not be in the new page</noinclude><preload><noinclude>This text will be placed on the new page and will be surrounded by noinclude tags</noinclude></preload>

Comment 8 P.Copp 2008-12-21 12:58:38 UTC
*** Bug 16733 has been marked as a duplicate of this bug. ***
Comment 9 P.Copp 2008-12-21 13:04:49 UTC
Since this is not really an Inputbox issue, I'm changing component to 'Page editing'.
Comment 10 Umherirrender 2009-03-20 17:53:29 UTC
*** Bug 17723 has been marked as a duplicate of this bug. ***
Comment 11 Alexandre Emsenhuber [IAlex] 2009-11-11 11:37:47 UTC
*** Bug 21472 has been marked as a duplicate of this bug. ***
Comment 12 Daniel A. R. Werner 2009-12-03 00:57:55 UTC
Splarka already told a way to fix this bug 1 and 1/2 years ago (in Comment  #6) so where is the problem, why not fixing it? This one goes on my nerves.
Or are you afraight this could lead to some unexpected issues in some wikis because of wanted <noincludes> which should appear after loading? If that's the case we should add a config variable to set the preload behavior.
But still: There should be no guarantee that bugusing will work in future MW versions. And since <includeonly> works perfectly with preload I can't see nothing but a bug here!
Comment 13 Conrad Irwin 2010-02-05 16:49:56 UTC
Fixed in r62035
Comment 15 Conrad Irwin 2010-06-10 12:29:07 UTC
Re-fixed in r63194

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


Navigation
Links