]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/barfs_on_recentchange_entry_for_a_change_removing_an_invalid_pagespec.mdwn
Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
[ikiwiki.git] / doc / bugs / barfs_on_recentchange_entry_for_a_change_removing_an_invalid_pagespec.mdwn
1 I have a commit doing
2
3     -\[[map pages="link(tag/<TMPL_VAR name>) and !papers/*"]]
4     +\[[map pages="link(sourcepage()) and !papers/*"]]
5
6 ikiwiki now fails to compile the site, barfing:
7
8     Use of uninitialized value in subroutine entry at /usr/share/perl5/IkiWiki.pm line 1288.
9     ikiwiki.setup: Can't use string ("") as a subroutine ref while "strict refs" in use at /usr/share/perl5/IkiWiki.pm line 1288.
10     BEGIN failed--compilation aborted at (eval 6) line 200.
11
12 after forcefully entering the Perl mode of thinking, I reduced this to line
13 1285 of IkiWiki.pm (2.53), which apparently returns `undef`:
14
15     my $sub=pagespec_translate($spec);
16
17 Why does it even bother parsing the diffs of `recentchanges`?
18
19 I have not recompiled this site in ages, so I am not sure when this problem
20 was introduced, but it wasn't there when I worked on the site last about
21 a year ago in September 2007.
22
23 -- [[madduck]]
24
25 > I can't reproduce this problem. When I try, the generated
26 > `recentchanges/change_$sha1._change` file has the diff properly escaped,
27 > so that the map is not expanded at all.
28
29 > I also tried de-escaping that, and still failed to reproduce any crash.
30 > The bogus pagespec simply expands to nothing. The line directly after the
31 > line you quoted checks for syntax errors in the pagespec translation
32 > eval and seems to be working fine:
33
34 >       joey@kodama:~>perl -e 'use IkiWiki; my
35 >       $sub=IkiWiki::pagespec_translate("link(tag/<TMPL_VAR name>) and !papers/*"); print "caught failure:".$@'
36 >       caught failure:syntax error at (eval 14) line 1, near "|| &&"
37
38 > Based on your line numbers, you are not running a current version of
39 > ikiwiki. (Doesn't quite seem to be version 2.53.x either) Try with a current
40 > version, and see if you can send me a source tree that can reproduce the
41 > problem? --[[Joey]]
42
43 Did not hear back, so calling this [[done]], unless I hear differently.
44 --[[Joey]]