Scary transclusion is non-intuitive and unreliable
OpenPublic

Description

Author: MediaWiki

Description:
Right now, if one transcludes a page from another wiki using the wgEnableScaryTranscluding functionality, it does not properly obey <noinclude>. I'm guessing this is because it's getting content from the other wikis using action=render?

Anyway, it should use action=raw to get the plain wikitext and parse it locally, calling in remote template source (also with action=raw) until the include is done, then put the fully-parsed, behaving-as-expected text in the including article.


Version: 1.16.x
Severity: normal

bzimport added a project: MediaWiki-Templates.Via ConduitNov 21 2014, 10:00 PM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz12401.
bzimport created this task.Via LegacyDec 24 2007, 2:31 PM
Mr.Z-man added a comment.Via ConduitJan 28 2008, 10:47 PM

if you use it as {{raw:interwiki:templatename}} it will parse the raw text.

bzimport added a comment.Via ConduitJan 28 2008, 11:24 PM

MediaWiki wrote:

(In reply to comment #1)

if you use it as {{raw:interwiki:templatename}} it will parse the raw text.

I guess what I'm thinking is that parsing the raw text would be the logical default, so it behaves like other transclusions from the local wiki.

bzimport added a comment.Via ConduitFeb 2 2008, 4:18 PM

amtw-wikibugs wrote:

When I try <nowiki>{{raw:wikipedia:unsourced}}</nowiki>, I get:

Forbidden
Raw pages must be accessed through the primary script entry point.

It accesses <nowiki>http://en.wikipedia.org/wiki/Template:unsourced?action=raw</nowiki>

What is the markup for using Wikipedia's "Unsourced" template on
my wiki?
~~~~

bzimport added a comment.Via ConduitMar 19 2009, 10:02 PM

jlerner wrote:

I ran into the same problem. Try setting iw_url to something like http://en.wikipedia.org/w/index.php?title=$1, in the interwiki table. Then the {{raw:wikipedia:unsourced}} syntax should work.

Note: I had trouble getting the system to recognize this change, so I just created a new prefix.

bzimport added a comment.Via ConduitJun 25 2009, 3:14 PM

wikipedia wrote:

This bug still appears in 1.15.0. Things in <noinclude> still shows up during interwiki-transclusion.

I tried the suggestion in comment #4, but {{raw:wikipedia:unsourced}} shows the following line:

    • Start quote -----
  1. REDIRECT Template:Unreferenced
    • End quote ------

It does not give an expected result - gives the unsourced box.

Mr.Z-man added a comment.Via ConduitJun 25 2009, 3:29 PM

The problems I see are twofold:

  1. The default action is confusing. Rather than just getting the wikitext and using it like a template, it grabs the action=render output and just includes the HTML.
  2. The "raw" usage uses ?action=raw, so breaks on wikis with "pretty URLs" and can't follow redirects.

The first could be fixed without too much work probably, but it would break backward compatibility for people who want the current behavior.

For the second, it would probably be best if scary transclusion used the API to get the page text, but that would be dependent on it being able to find the API, which would depend on bug 14024.

IAlex added a comment.Via ConduitAug 27 2009, 6:56 PM
  • Bug 16137 has been marked as a duplicate of this bug. ***
IAlex added a comment.Via ConduitAug 29 2009, 7:09 PM
  • Bug 16490 has been marked as a duplicate of this bug. ***
bzimport added a comment.Via ConduitApr 16 2011, 5:33 AM

wikipedia wrote:

As of Mediawiki versions 1.16.2, this problem still persists.

When I do {{wikipedia:mbox|text=Test}}, that would transclude the whole Template:Mbox documentation page. The documentation page is in the <noinclude> tags. So it is still not working.

Add Comment