2015-02-27 14:23:21 +01:00
|
|
|
I recently moved from Trisquel's version of ikiwiki (from 2013, the same one of
|
|
|
|
Debian wheezy backports) to the version 5.20141016 which I built from git, by
|
|
|
|
pulling the tag. One of the new things I have now is the templatebody
|
|
|
|
directive.
|
|
|
|
|
2015-03-01 14:11:46 +01:00
|
|
|
> Not directly relevant to this bug, but if you want the latest ikiwiki release
|
|
|
|
> for a Debian derivative, you can fetch it from Debian unstable (normally)
|
|
|
|
> or Debian experimental (during the Debian release freeze, e.g. now) -
|
|
|
|
> the correct way is to get the (signed) source package with `dget`
|
|
|
|
> or similar, check the GPG signature (which should be from me or Joey), and
|
|
|
|
> rebuild it for your distribution. Just getting the binary `.deb` from Debian
|
|
|
|
> is a little more risky, depending how far your distribution has diverged from
|
|
|
|
> Debian, but in the case of ikiwiki it should usually work fine in practice.
|
|
|
|
> --[[smcv]]
|
|
|
|
|
2015-02-27 14:23:21 +01:00
|
|
|
I started using it in my templates, and I suddenly notice strange behavior: one
|
|
|
|
of my templates renders as the *rest* of the template page when used, instead of
|
|
|
|
the body part. In other words, it renders exactly the part it should hide (the
|
|
|
|
description) and ignores the body itself (which is inside \[[!templatebody]]).
|
|
|
|
|
|
|
|
When I manually re-generate the wiki, it suddenly renders right. As soon as the
|
|
|
|
page gets rebuilt automatically after some git push, it renders the wrong way.
|
|
|
|
|
2015-03-01 14:11:46 +01:00
|
|
|
> Where did you install the newer ikiwiki? `/usr/local`? Somewhere else?
|
|
|
|
>
|
|
|
|
> It sounds to me as though manual re-generation is using ikiwiki ≥ 3.20140916
|
|
|
|
> with the `templatebody` directive enabled, but the git hook is using
|
|
|
|
> ikiwiki < 3.20140916 and/or has the `templatebody` disabled. This might
|
|
|
|
> result from having a different `PERL5LIB` environment variable in
|
|
|
|
> the two situations, for instance.
|
|
|
|
>
|
|
|
|
> It might help to debug this if you edit your older and newer ikiwiki's
|
|
|
|
> `IkiWiki.pm`, `IkiWiki/Render.pm` and/or `IkiWiki/Plugin/templatebody.pm`
|
|
|
|
> so they do `print STDERR "loaded (old/new) (whatever).pm"` at some fairly
|
|
|
|
> early stage - I would suggest `getsetup()`, `refresh()` and `import()`
|
|
|
|
> respectively. --[[smcv]]
|
|
|
|
|
2015-04-07 16:14:11 +02:00
|
|
|
>> Yes, I installed in `/usr/local`, but I also removed the deb package. So I
|
|
|
|
>> only have 1 ikiwiki version now.
|
|
|
|
>>
|
|
|
|
>> I also noticed the following behavior. I created a set of pages, each of them
|
|
|
|
>> containing several occurences of a certain template. Then I created another
|
|
|
|
>> page, which inlines all of them. All good. Then, I edited that main page to do
|
|
|
|
>> different sorting (using inline directive's sort option). After comitting the change,
|
|
|
|
>> suddenly all the inlined pages have the templates inside them contain the
|
|
|
|
>> template info instead of template body. How is that even related to the minor
|
|
|
|
>> change I did - change the sorting? :-P
|
|
|
|
>>
|
|
|
|
>> I'll look at the templatebody.pm file and try debug prints. I hope I can see them in
|
|
|
|
>> the git push output, because rendering the wiki from command line doesn't have this
|
|
|
|
>> problem.
|
|
|
|
>>
|
|
|
|
>> Thanks for the pointers.
|
2015-04-07 16:15:38 +02:00
|
|
|
>>
|
|
|
|
>> --[[fr33domlover]]
|
|
|
|
|
2015-04-07 16:14:11 +02:00
|
|
|
|
2015-02-27 14:23:21 +01:00
|
|
|
[[This|http://www.rel4tion.org/languages/haskell/]] is the page, and
|
|
|
|
[[this|http://www.rel4tion.org/templates/wikitag/]] is a template it uses. Right
|
|
|
|
now the template is rendered on that page exactly like the template page itself.
|
|
|
|
Both display the description text, and the \[[!templatebody]] content isn't
|
|
|
|
displayed at all.
|
|
|
|
|
|
|
|
If I debug it myself and find something relevant, I'll update here.
|
|
|
|
|
|
|
|
-- [[fr33domlover]]
|