summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorchrysn <chrysn@web>2008-08-29 17:43:28 -0400
committerJoey Hess <joey@kitenet.net>2008-08-29 17:43:28 -0400
commita8d9f1c5cd1bbceef5d946aae54e0432b7bfb40a (patch)
treea3e17b05b9e6c48a46d3482531df8819c7c1a9a2 /doc
parent981d0474a1676aedeccba245d2368abaf28c588c (diff)
report bug for </methodResponse> problem (patch included)
Diffstat (limited to 'doc')
-rw-r--r--doc/bugs/methodResponse_in_add__95__plugins.mdwn34
1 files changed, 34 insertions, 0 deletions
diff --git a/doc/bugs/methodResponse_in_add__95__plugins.mdwn b/doc/bugs/methodResponse_in_add__95__plugins.mdwn
new file mode 100644
index 000000000..64a919cec
--- /dev/null
+++ b/doc/bugs/methodResponse_in_add__95__plugins.mdwn
@@ -0,0 +1,34 @@
+**problem description:** when using an external plugin like rst, the cgi script (but not the build process) fails with the following words:
+
+ Unsuccessful stat on filename containing newline at /usr/share/perl5/IkiWiki.pm line 501.
+ Unsuccessful stat on filename containing newline at /usr/share/perl5/IkiWiki.pm line 501.
+ Failed to load plugin IkiWiki::Plugin::</methodResponse>
+ : Can't locate IkiWiki/Plugin/.pm in @INC (@INC contains: /home/ikiwiki/.ikiwiki /etc/perl \
+ /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 \
+ /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at (eval 44) line 3.
+ BEGIN failed--compilation aborted at (eval 44) line 3.
+
+**setup used:** blank debian sid with ikiwiki 2.61 (but as the patch can be cleanly merged to git HEAD, i suppose this would happen on HEAD as well). perl version is 5.10.0-13.
+
+**problem analysis:** `strings ikiwiki.cgi` tells that the stored WRAPPED\_OPTIONS contain the string "&lt;/methodResponse&gt;\n" where i'd expect "rst" in `config{add_plugins}`. this seems to originate in the use of `$_` in the plugin loading function.
+
+**patch comment:** solves the problem on 2.61. as these are the first lines of perl i've knowingly written, i can not explain what exactly was happening there.
+
+------------------------------------------------------------------------------
+ diff --git a/IkiWiki.pm b/IkiWiki.pm
+ index e476521..d43abd4 100644
+ --- a/IkiWiki.pm
+ +++ b/IkiWiki.pm
+ @@ -471,7 +471,11 @@ sub loadplugins () { #{{{
+ unshift @INC, possibly_foolish_untaint($config{libdir});
+ }
+
+ - loadplugin($_) foreach @{$config{default_plugins}}, @{$config{add_plugins}};
+ + my $pluginname;
+ + foreach $pluginname (@{$config{default_plugins}}, @{$config{add_plugins}})
+ + {
+ + loadplugin($pluginname);
+ + }
+
+ if ($config{rcs}) {
+ if (exists $IkiWiki::hooks{rcs}) {