Brion,
Uwe Baumbach wrote:
Looking at method preload (Article.php) you can see that <includeonly> tags will be swept.
There is no "preload" method in Article.php.
You are right, sure.
Do you mean getPreloadedText() in EditPage?
Yes.
Is it by mischance or by consciously decision that <noinclude>...</noinclude> parts remain?
Sounds normal to me; you either keep the parts for includes or the parts that aren't for includes.
<includeonly> -> when not including, remove this
<onlyinclude> -> when including, remove anything outside this
Where is the code doing even this?
<noinclude> -> when including, remove this
And that?
However the code that's there doesn't make sense to me; it appears to be removing only the actual <includeonly> and </includeonly> start and end tags, not their content.
That´s right. And makes sense - after all: preloading is for me: including. So it removes <includeonly> tags (correct!) leaves the content (correct!) but this only (in my understanding) the half of work. So:
Would it be reasonable to add this $text = preg_replace('/<noinclude>.*?</noinclude>/s', '', $text ); into the main source code branch?
In my installation it works - removes opening and closing tags and text between them.
Wouldn't that lead to a confusing mix of both?
Can´t see this. Your view is much better then mine ;-)
The only crucial thing I can imagine is article import. Don´t know whether preloading is used there.
We need it for the useful extension InputBox (Eric Moeller) that calls preload feature for a new created article. With this extension we can avoid to explain new users what a template is and how {{subst:...}} works and so on. Our clientele is by the majority older and less skilled...
wikitech-l@lists.wikimedia.org