This is an intermittent problem that seems to depend on soemthing else that I have yet to determine, but it reproducable on my test platform in application webs
The
CommentPlugin reads templates from
CommentsTmpl The last line of this reads:
%TMPL:INCLUDE{"%TWIKIWEB%.UserTemplates"}%
However, under many conditions, specifically use in the application web(s), referring to any template in the
UserTemplates produces the error message:
No such template def TMPL:DEF{PROMPT:forumtalk}
If this is changed to
%TMPL:INCLUDE{"TWiki.UserTemplates"}%
the problem goes away.
So far as I can determine, the call to
TWiki::Func::loadTemplate( );
and subsequent
TWiki::Func::expandTemplate();
in
TWiki::Plugins::CommentPlugin::Comment::_getTemplate()
does not expand the %TWIKIWEB%. This is not becuase it is enclosed by a
verbatim
block.
The contents of
/templates/comments.tmpl
have the TWiki web hard coded, rather than using %TWIKIWEB%:
%TMPL:INCLUDE{TWiki.CommentsTmpl}%
This 'hard coding' is not documented.
The comment in the code
# Expand the template in the context of the web where the comment
# box is (not the target of the comment!)
is misleading. I'm obviously interpreting it in a different way to that itneded by the author of the code.
This points to a bigger problem with the comment plugin, in that TWiki is not expanded when including templates using %TMPL:INCLUDE.
I have fixed the plugin so that it doesn't use this construct. Note that the standard templates topic will still include
UserCommentsTmpl, but the documentation tells you to
UserCommentTemplate (this allows a more generic style of customisation, including per-web and per-skin template customisation; see the revised plugin topic). Please re-open this issue if there are any further problems.
SVN 7251
CC