1 I recently moved from Trisquel's version of ikiwiki (from 2013, the same one of
2 Debian wheezy backports) to the version 5.20141016 which I built from git, by
3 pulling the tag. One of the new things I have now is the templatebody
6 > Not directly relevant to this bug, but if you want the latest ikiwiki release
7 > for a Debian derivative, you can fetch it from Debian unstable (normally)
8 > or Debian experimental (during the Debian release freeze, e.g. now) -
9 > the correct way is to get the (signed) source package with `dget`
10 > or similar, check the GPG signature (which should be from me or Joey), and
11 > rebuild it for your distribution. Just getting the binary `.deb` from Debian
12 > is a little more risky, depending how far your distribution has diverged from
13 > Debian, but in the case of ikiwiki it should usually work fine in practice.
16 I started using it in my templates, and I suddenly notice strange behavior: one
17 of my templates renders as the *rest* of the template page when used, instead of
18 the body part. In other words, it renders exactly the part it should hide (the
19 description) and ignores the body itself (which is inside \[[!templatebody]]).
21 > With a hint from [[kjs]] on [[templates/discussion]], I was able to reproduce
22 > this bug. It seems to have been caused by an optimization: please try applying
23 > [commit 5fd863b5](http://source.ikiwiki.branchable.com/?p=source.git;a=commitdiff;h=5fd863b5b05449669ec56c6798d836e3302386e2)
24 > to your Render.pm. A follow-up commit partially brings back the optimization
25 > (only for rebuilds). So I think this is [[done]]? (remove that link if
28 When I manually re-generate the wiki, it suddenly renders right. As soon as the
29 page gets rebuilt automatically after some git push, it renders the wrong way.
31 > Where did you install the newer ikiwiki? `/usr/local`? Somewhere else?
33 > It sounds to me as though manual re-generation is using ikiwiki ≥ 3.20140916
34 > with the `templatebody` directive enabled, but the git hook is using
35 > ikiwiki < 3.20140916 and/or has the `templatebody` disabled. This might
36 > result from having a different `PERL5LIB` environment variable in
37 > the two situations, for instance.
39 > It might help to debug this if you edit your older and newer ikiwiki's
40 > `IkiWiki.pm`, `IkiWiki/Render.pm` and/or `IkiWiki/Plugin/templatebody.pm`
41 > so they do `print STDERR "loaded (old/new) (whatever).pm"` at some fairly
42 > early stage - I would suggest `getsetup()`, `refresh()` and `import()`
43 > respectively. --[[smcv]]
45 >> Yes, I installed in `/usr/local`, but I also removed the deb package. So I
46 >> only have 1 ikiwiki version now.
48 >> I also noticed the following behavior. I created a set of pages, each of them
49 >> containing several occurences of a certain template. Then I created another
50 >> page, which inlines all of them. All good. Then, I edited that main page to do
51 >> different sorting (using inline directive's sort option). After comitting the change,
52 >> suddenly all the inlined pages have the templates inside them contain the
53 >> template info instead of template body. How is that even related to the minor
54 >> change I did - change the sorting? :-P
56 >> I'll look at the templatebody.pm file and try debug prints. I hope I can see them in
57 >> the git push output, because rendering the wiki from command line doesn't have this
60 >> One more thing, my setup uses the pingee plugin. When doing a git push, it browses to
61 >> the wiki page using wget with `?do=ping` parameter, and then ikiwiki responds by rebuilding
62 >> the necessary pages.
64 >> Thanks for the pointers.
69 [[This|http://www.rel4tion.org/languages/haskell/]] is the page, and
70 [[this|http://www.rel4tion.org/templates/wikitag/]] is a template it uses. Right
71 now the template is rendered on that page exactly like the template page itself.
72 Both display the description text, and the \[[!templatebody]] content isn't
75 If I debug it myself and find something relevant, I'll update here.