I'm trying to transclude content from a template on one wiki to another, both under the same domain, in different subdomains, running off of one MW install v.1.8.2.
I've added this to LocalSettings.php: $wgEnableScaryTranscluding = true;
In phpMyAdmin, for the wiki that will receive the content:
I set iw_local: 1 iw_trans: 1
If I have this for iw_url: http://against-the-day.pynchonwiki.com/wiki/$1
and this code on the target wiki page:
{{pwiki:Help}} (Help is a template I created)
I get this in the preview:
[Template fetch failed for http://against-the-day.pynchonwiki.com/ wiki/Template%3AHelp?action=render; sorry]
If I have this for the iw_url: http://against-the-day.pynchonwiki.com/wiki/index.php?title=$1
it pulls in the whole page, styles and all. Doesn't work at all.
For some reason, the colon is getting read as "%3A".
Thanks. Tim
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Tim Ware wrote:
If I have this for iw_url: http://against-the-day.pynchonwiki.com/wiki/$1
and this code on the target wiki page:
{{pwiki:Help}} (Help is a template I created)
I get this in the preview:
[Template fetch failed for http://against-the-day.pynchonwiki.com/ wiki/Template%3AHelp?action=render; sorry]
Well failure there isn't surprising, since that URL appears to be wrong. :)
If I have this for the iw_url: http://against-the-day.pynchonwiki.com/wiki/index.php?title=$1
it pulls in the whole page, styles and all. Doesn't work at all.
The old transclusion code will break on foreign URLs using query strings.
Fix is on trunk (for 1.9) in r18684.
You can either try to apply that change to the 1.8 code, or just do a quick hack to change the "?action=$action" to "&action=$action" in interwikiTransclude() in Parser.php
For some reason, the colon is getting read as "%3A".
That's normal and harmless (but also fixed, I believe).
- -- brion vibber (brion @ pobox.com)
mediawiki-l@lists.wikimedia.org