SID-01038: No such template def TMPL:DEF{PROMPT:myComment}
| Status: |
Answered |
TWiki version: |
5.0.1 |
Perl version: |
5.12.2 |
| Category: |
CommentPlugin |
Server OS: |
Ubuntu Linux 10.10 |
Last update: |
15 years ago |
Converting from 4.3.1 to 5.0.1. Comment plugin can no longer locate custom templates, giving message "No such template def TMPL:DEF{PROMPT:myComment}".
UserCommentsTemplate contains:
%TMPL:DEF{PROMPT:myComment}%%TMPL:P{promptbox}%%TMPL:END%
%TMPL:DEF{OUTPUT:myComment}%%TMPL:P{problemtext}%%POS:BEFORE%
%TMPL:END%
%TMPL:DEF{problemtext}%---++++++ !!%WIKIUSERNAME% - %SERVERTIME%
%URLPARAM{"comment"}%
%TMPL:END%
--
LarryBristol - 2010-11-26
Discussion and Answer
I actually understated the problem. The plugin cannot locate
ANY template! I changed one to use the default template and got:
No such template def TMPL:DEF{PROMPT:above}
--
LarryBristol - 2010-11-29
Not so intuitive, but of you define your own comment template page you need to include the generic comment template:
%TMPL:INCLUDE{"%SYSTEMWEB%.CommentPlugin"}%. See example at
SupportCommentTemplate.
--
PeterThoeny - 2010-11-29
I have added that, but it seems to make no difference. The thing is, the
CommentPlugin was working in TWiki 4.3.2, and all I have done is copy it into 5.0.1 system. I am obviously overlooking something very basic. Here is the complete contents of "UserCommentsTemplate":
User Templates for
CommentPlugin - See %TWIKIWEB%.CommentPlugin#Customisation for help.
%TOC%
Template definitions
Short comment, Long comment, signed and dated
<verbatim>
%TMPL:DEF{PROMPT:myComment}%%TMPL:P{promptbox}%%TMPL:END%
%TMPL:DEF{OUTPUT:myComment}%%TMPL:P{problemtext}%%POS:BEFORE%
%TMPL:END%
%TMPL:DEF{myoutput}% * %WIKIUSERNAME% - %SERVERTIME%<br />%URLPARAM{"comment"}%%TMPL:END%
</verbatim>
Comment format "forum" - Long comment, signed and dated
<verbatim>
%TMPL:DEF{PROMPT:forum}%%TMPL:P{promptbox}%%TMPL:END%
%TMPL:DEF{OUTPUT:forum}%%TMPL:P{forumtext}%%POS:BEFORE%
%TMPL:END%
%TMPL:DEF{forumtext}%
%WIKIUSERNAME% - %SERVERTIME%
%URLPARAM{"comment"}%
%TMPL:END%
</verbatim>
<!--
%WIKIUSERNAME% - %SERVERTIME%<br />%URLPARAM{"comment"}%
-->
Comment format "problem" - Long comment, signed and dated
<verbatim>
%TMPL:DEF{PROMPT:problem}%%TMPL:P{promptbox}%%TMPL:END%
%TMPL:DEF{OUTPUT:problem}%%TMPL:P{problemtext}%%POS:BEFORE%
%TMPL:END%
%TMPL:DEF{problemtext}%---++++++ !!%WIKIUSERNAME% - %SERVERTIME%
%URLPARAM{"comment"}%
%TMPL:END%
</verbatim>
Include generic comment templates:
<verbatim>
%TMPL:INCLUDE{"%SYSTEMWEB%.CommentPlugin"}%
</verbatim>
--
LarryBristol - 2010-11-30
Please see my comment in SID-01041 concerning a possible perl problem.
--
LarryBristol - 2010-12-02
I am still floundering out here, guys. Please help! Nothing I have tried has made any difference at all. I even reinstalled TWiki completely. The
CommentPlugin cannot locate
any template, including the ones built-in. I cannot turn over the new system until this significant piece of functionality is working again!
--
LarryBristol - 2010-12-06
As I stated previously,
CommentPlugin cannot find
any template,
including the built-in ones.
I can now state categorically that it has
nothing to do with perl.
It simply cannot find any templates unless I
explicitly tell it where to look.
This works:
%COMMENT{ templatetopic="%SYSTEMWEB%.CommentPluginTemplate" }%
This does not:
%COMMENT{ }%
I would appreciate some help.
I cannot turn 5.0.1 over into production until I get this resolved.
--
LarryBristol - 2010-12-10
I am puzzled. Did you do a clean install of TWiki or upgraded over an existing TWiki? Did you use configure to initially create the
twiki/lib/LocalSite.cfg?
--
PeterThoeny - 2010-12-10
It was originally a brand new install, and I used the configure script. I later copied the user webs into the directory tree. There was some trouble with getting the initial configuration done. I do not recall what it was now.
But something is clearly wrong... the configuration file is actually located in
twiki/bin/LocalSite.cfg! I will attach the file. I also see a directory named
twiki/bin/NOT SET that seems to make me recall some bad memories about getting the initial configuration done.
--
LarryBristol - 2010-12-10
There is a
twiki/bin/LocalLib.cfg which defines just the location of the
twiki/lib. All config settings are at
twiki/lib/LocalSite.cfg.
Make sure your TWiki web (e.g.
twiki/data/TWiki and
twiki/pub/TWiki) is virgin from the 5.0.1 package. Delete the
twiki/bin/LocalSite.cfg and redo the configure.
--
PeterThoeny - 2010-12-10
The file you attached is odd. It combines
twiki/bin/LocalLib.cfg and
twiki/lib/LocalSite.cfg into one. Split them up into two.
twiki/bin/LocalLib.cfg has the first few lines up to
1; # Required for successful module loading, and the rest goes into
twiki/lib/LocalSite.cfg. Make sure the latter one is writable by the Apache webserver user.
--
PeterThoeny - 2010-12-11
OK. I did as you suggested. I deleted the
twiki/data/TWiki and
twiki/pub/TWiki directories and rebuilt them by copying a virgin 5.0.1 package, and reran the configure script. Other than eliminating a few plug-in files, it seems to have had no effect at all. I will reinstall the plug-ins later.
I examined the
twiki/bin/LocalLib.cfg file. It contained only the lines you specified, mostly comments ending with the
1; # Required for successful module loading. I will attach that file.
I edited the
twiki/lib/LocalSite.cfg file, removing all of those leading lines that were in the other file. I will attach that file, as well.
Unfortunately, this seems to have had no effect either.
The easiest way for me to test this is to display the
TWiki/CommentPluginExamples topic, where I get the "No such template def TMPL:DEF{PROMPT:-fill-in-the-name-}" message for every one of the built-in templates. I'm not worrying about my custom templates for now; I figure they will start working as soon as the built-in templates work.
I appreciate your efforts! I'm sure it will turn out to be something simple in the end, but it seems to be way over my head at the moment.
--
LarryBristol - 2010-12-11
Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the
TWiki consultants if you need timely help. We invite you to
get involved with the community, it is more likely you get community support if you support the open source project!
--
PeterThoeny - 2011-02-21
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.