]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/inline_raw_broken_on_unknown_pagetype.mdwn
Patch added
[ikiwiki.git] / doc / bugs / inline_raw_broken_on_unknown_pagetype.mdwn
1 When trying to insert the raw content of an attached shell script
2 called `whatever` using:
3
4     \[[!inline pages="whatever" raw="yes"]]
5
6 The generated HTML contains:
7
8     \[[!inline Erreur: Can't call method "param" on an undefined value
9     at /usr/local/share/perl/5.10.0/IkiWiki/Plugin/inline.pm
10     line 346.]]
11
12 Looking at the inline plugin's code, it is clear that `$template` is
13 undef in such a situation. Defining `$template` just before line 346,
14 in case it's not defined, removes the error message, but nothing
15 gets inlined as `get_inline_content` returns the empty string in
16 this situation.
17
18 If we explicitely don't want to allow raw inlining of unknown page
19 types, ikiwiki should output a better error message.
20
21 > I have made it just do a direct include if the page type is not known, in
22 > raw mode. That seems useful if you want to include some other file right
23 > into a page. You could probably even wrap it in a format directive.
24
25 > It does allow including binary files right into a page, but nothing is
26 > stopping you pasting binary data right into the edit form either, so
27 > while annoying I don't think that will be a security problem. --[[Joey]]