wgEnableScaryTranscluding and Templates/Images?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

wgEnableScaryTranscluding and Templates/Images?

Jim Tittsler-5
I have a small wiki farm.  I would like to include templates (and in a
couple of places transclude entire pages) from one "main" wiki into
some of the smaller instances.  I have enabled
wgEnableScaryTranscluding and set iw_local and iw_trans in the rows
associated with my iw_prefix of my interwiki table.

If I include a template like {{we:Objective|Think}} the text of the
template is included in my page as I had hoped.  But:
 1. the parameter reference doesn't appear to get substituted, it
renders as {{{1}}}
 2. if the template (or other page I try to transclude) includes
images, they render as broken images

In an attempt to fix the second problem, folks on #mediawiki suggested
I setup a foreign file repo.  That does allow me to transparently
reference images that exist in the main wiki, but does not seem to
affect the rendering of images in transcluded templates and pages.
(Meaning [[Image:Objective.gif]] works, but if Template:Objective
references that image, it is broken when the template is pulled across
the interwiki reference above.)

How can I get templates (and transcluded pages) to work across wiki
instances?

(Mediawiki 1.15.3)

_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: wgEnableScaryTranscluding and Templates/Images?

Platonides
Jim Tittsler wrote:

> I have a small wiki farm.  I would like to include templates (and in a
> couple of places transclude entire pages) from one "main" wiki into
> some of the smaller instances.  I have enabled
> wgEnableScaryTranscluding and set iw_local and iw_trans in the rows
> associated with my iw_prefix of my interwiki table.
>
> If I include a template like {{we:Objective|Think}} the text of the
> template is included in my page as I had hoped.  But:
>  1. the parameter reference doesn't appear to get substituted, it
> renders as {{{1}}}
>  2. if the template (or other page I try to transclude) includes
> images, they render as broken images

Try with {{raw:we:Objective|Think}}.


> In an attempt to fix the second problem, folks on #mediawiki suggested
> I setup a foreign file repo.  That does allow me to transparently
> reference images that exist in the main wiki, but does not seem to
> affect the rendering of images in transcluded templates and pages.
> (Meaning [[Image:Objective.gif]] works, but if Template:Objective
> references that image, it is broken when the template is pulled across
> the interwiki reference above.)

Setting an absolute path for $wgUploadPath in the target wiki would
solve this.



_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Raw pages must be accessed through the primary script entry point

Colonna Francois
Hello

I have a problem with subcluding a Template from one wiki to the other

I have enabled wgEnableScaryTranscluding and set iw_local and iw_trans
in the rows associated with my iw_prefix of my interwiki table.

While transcluding with input {{wikiccv:annotations}} works fine
subcluding with input {{subst:wikiccv:annotations}} gives this message :

[Template fetch failed for
http://82.226.95.82/~wiki/wikiccv/mediawiki/index.php/Template:annotations?action=raw]

which in turn gives :
Forbidden
Raw pages must be accessed through the primary script entry point.


I am sorry, I do not understand the meaning of "primary script entry
point"

Could someone help ?

Thanks
Francois Colonna


_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: wgEnableScaryTranscluding and Templates/Images?

Jim Tittsler-5
In reply to this post by Platonides
On 2010-05-22 05:27, Platonides wrote:
> Jim Tittsler wrote:
[...]
>> If I include a template like {{we:Objective|Think}} the text of the
>> template is included in my page as I had hoped.  But:
>>  1. the parameter reference doesn't appear to get substituted, it
>> renders as {{{1}}}
>>  2. if the template (or other page I try to transclude) includes
>> images, they render as broken images
>
> Try with {{raw:we:Objective|Think}}.

That generates an error message:

Template fetch failed for
http://wikieducator.org/Template:Objective?action=raw]

Fetching
http://wikieducator.org/index.php?action=raw&title=Template:Objective
with wget does appear to give me the raw template (with a MIME type of
text/x-wiki).

Is some additional configuration necessary for Mediawiki 1.15.3?

>> In an attempt to fix the second problem, folks on #mediawiki suggested
>> I setup a foreign file repo.  That does allow me to transparently
>> reference images that exist in the main wiki, but does not seem to
>> affect the rendering of images in transcluded templates and pages.
>> (Meaning [[Image:Objective.gif]] works, but if Template:Objective
>> references that image, it is broken when the template is pulled across
>> the interwiki reference above.)
>
> Setting an absolute path for $wgUploadPath in the target wiki would
> solve this.

Thanks, that fixed the problem with broken images in interlanguage
transcluded pages.

_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Raw pages must be accessed through the primary script entry point

Jesse (Pathoschild)
In reply to this post by Colonna Francois
On Sun, May 23, 2010 at 3:02 PM, Francois Colonna
<[hidden email]> wrote:
> I am sorry, I do not understand the meaning of "primary script entry
> point"


Hello Francois,

This error means that raw pages must be accessed through a real URL
like "/index.php?title=foo.js", instead of shortened URLs like
"/wiki/foo.js" or "/index.php/foo.js". This only seems to apply to
JavaScript pages (*.js) on Wikimedia wikis; there might be a
configuration setting that changes whether it applies to all raw
pages.

--
Yours cordially,
Jesse (Pathoschild)

_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: wgEnableScaryTranscluding and Templates/Images?

Platonides
In reply to this post by Jim Tittsler-5
Jim Tittsler wrote:
>> Try with {{raw:we:Objective|Think}}.
>
> That generates an error message:
>
> Template fetch failed for
> http://wikieducator.org/Template:Objective?action=raw]

This used to be possible, but was changed some time ago to require
acccess via index.php

> Fetching
> http://wikieducator.org/index.php?action=raw&title=Template:Objective
> with wget does appear to give me the raw template (with a MIME type of
> text/x-wiki).
>
> Is some additional configuration necessary for Mediawiki 1.15.3?

You could change the interwiki to
http://wikieducator.org/index.php?title=$1


_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Raw pages must be accessed through the primary script entry point

Colonna Francois
In reply to this post by Jesse (Pathoschild)
On Mon, 2010-05-24 at 09:31 -0400, Jesse (Pathoschild) wrote:

> On Sun, May 23, 2010 at 3:02 PM, Francois Colonna
> <[hidden email]> wrote:
> > I am sorry, I do not understand the meaning of "primary script entry
> > point"
>
>
> Hello Francois,
>
> This error means that raw pages must be accessed through a real URL
> like "/index.php?title=foo.js", instead of shortened URLs like
> "/wiki/foo.js" or "/index.php/foo.js". This only seems to apply to
> JavaScript pages (*.js) on Wikimedia wikis; there might be a
> configuration setting that changes whether it applies to all raw
> pages.
>

Thank you Jesse for your answer.

I got this message when I tried to "subclude" a template from a wiki to
another.
Here is an example :

{{subst:wikiots:annotations}} gives :

[Template fetch failed for
http://82.226.95.82/~wiki/wikiots/mediawiki/index.php/Template:annotations?action=raw]

Do you have any idea of how to fix it ?

Thanks
Francois



_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: Raw pages must be accessed through the primary script entry point

Jim Tittsler-5
On 2010-05-28 06:39, Francois Colonna wrote:
> On Mon, 2010-05-24 at 09:31 -0400, Jesse (Pathoschild) wrote:
>> This error means that raw pages must be accessed through a real URL
>> like "/index.php?title=foo.js", instead of shortened URLs like
>> "/wiki/foo.js" or "/index.php/foo.js". This only seems to apply to
>> JavaScript pages (*.js) on Wikimedia wikis; there might be a
>> configuration setting that changes whether it applies to all raw
>> pages.
[...]
> {{subst:wikiots:annotations}} gives :
> [Template fetch failed for
> http://82.226.95.82/~wiki/wikiots/mediawiki/index.php/Template:annotations?action=raw]

Did you try changing the iw_url in your interwiki database table to be
of the form:
 http://82.226.95.82/~wikiwikiots/mediawiki/index.php?title=$1
as suggested[1] by Platonides in response to my similar problem?  His
tip of changing the interwiki table to use the index.php?title=$1 form
appears to have worked in my case.

Jim

[1] http://lists.wikimedia.org/pipermail/mediawiki-l/2010-May/034120.html

--
Jim Tittsler     http://www.OnNZ.net/      GPG: 0x01159DB6
Python Starship  http://Starship.Python.net/crew/jwt/
Mailman IRC      irc://irc.freenode.net/#mailman

_______________________________________________
MediaWiki-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l