A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://phabricator.wikimedia.org/T7210 below:

⚓ T7210 preload parser should parse <noinclude> (as well as <includeonly>)

Event Timeline Comment Actions

herd wrote:

Preload is not actually part of the inputbox extension, change should be made in core. small mod to summary.

Comment Actions

herd wrote:

(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 Actions

daniel.brice wrote:

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 Actions

*** Bug 16733 has been marked as a duplicate of this bug. ***

Comment Actions

Since this is not really an Inputbox issue, I'm changing component to 'Page editing'.

Comment Actions

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!


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4