]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/recentchanges_sets_has__95__diffurl__61__1_when_diffurl_is_empty.mdwn
Fix python proxy to not crash when fed unicode data in getstate and setstate.
[ikiwiki.git] / doc / bugs / recentchanges_sets_has__95__diffurl__61__1_when_diffurl_is_empty.mdwn
1 recentchanges.pm sets the template variable HAS_DIFFURL to 1 based solely on whether or not diffurl is defined. I found that diffurl was defined, but empty. The recentchanges template depends on this for recentchangesdiff to properly function -- diff toggling is dependent on HAS_DIFFURL evaluating to false. Adding a check for a non-zero length diffurl fixed the issue for me. A patch against ikiwiki-3.20121212 is as follows:
2
3     --- a/IkiWiki/Plugin/recentchanges.pm       2013-01-27 20:08:59.000000000 -0800
4     +++ b/IkiWiki/Plugin/recentchanges.pm       2013-01-27 20:08:30.000000000 -0800
5     @@ -181,7 +181,8 @@ sub store ($$$) {
6                         else {
7                                 $_->{link} = pagetitle($_->{page});
8                         }
9     -                   if (defined $_->{diffurl}) {
10     +                   if (defined $_->{diffurl} &&
11     +                           length($_->{diffurl}) > 0) {
12                                 $has_diffurl=1;
13                         }
14      
15
16 (There should be one more line at the bottom with a single space on it...)
17
18 > [[applied|done]] --[[Joey]]