Question
The
CommentPlugin exhibits strange behavior if I have a SEARCH or INCLUDE variable anywhere in the page. Rather than submitting the comment, it jumps to the first topic returned by the SEARCH feature, or the page included with the INCLUDE.
This is local to my installation.
CommentSearchIncludeTopic demonstrates that it works correctly on TWiki.
I don't even know where to start debugging this one. Please help point me in the correct direction...
I downloaded the latest
CommentPlugin (download date: 14 May 2004), unzipped it, and then did an
ln -s view viewauth
in the bin direcory. Nothing more nor less.
Environment
--
KenMankoff - 14 May 2004
I see now that this is discussed (somewhat) in
CommentProblemWithDiscussionForum
But the resolution appears that it is
not a problem with Discussion Forum alone. The solution there was to revert to the 18 Feb release.
I tried that with limited success so far. Anyway, apparently I do now have a direction to start in....
--
KenMankoff - 14 May 2004
Need a bit more info, Ken. What are you searching for? I need the search expression you are using. Are you certain that no topic is touched? Is your TWiki public i.e. can I look?
--
CrawfordCurrie - 16 May 2004
Any search. Not sure how to escape search sequences so feel free to modify this comment. I'll use
verbatim
tags.
the entire page is only this:
%COMMENT{}%
%SEARCH{%TOPIC%}%
or
%INCLUDE{Main.KenMankoff}%
I have also created a null topic (just a space) and included that. Same result. An example page on this TWiki is
CommentSearchIncludeTopic. It works on this TWiki, but that exact
page, cut-and-paste, does not work on my local installation.
One of the sites is not public. The other is just a test installation on my
PowerBook laptop.
I can give you an account on that but its on a DHCP so we would need to arrange it on a specific day...
However you can have both access to the TWiki (it is public) and access to the account that installed it.
Thats not root, it is a user installation as recommended by the Mac OS X installation guide.
I backed out to version 1.17
CommentPlugin and it works fine. Unfortunately the bulleted notation is much nicer than the "-" notation for the comments. I edited the template and switched the " - " to a " *", and something strange occured: The comments show up with an asterisk, not a bullet, until I do the normal edit->preview->save cycle, at which point they become pretty-looking bullets.
The comment does not show up anywhere on the TWiki.
--
KenMankoff - 16 May 2004
Ken, the issue with the * showing up as a star is something to do with line terminations (CRLF versus LF), I think; I knew about it, but it didn't seem worth bothering about.
I have duplicated the behaviour you describe on my local installation; very, very strange. Continuing to debug.
OK, I think I sussed it. Good grief. The workaround is to modify
CommentPlugin.pm
, change the test
if ( defined( $action ) && $action eq "save" ) {
to
if ( defined( $action ) && $action eq "save" &&
$query->path_info() eq "/$_[2]/$_[1]" ) {
Please, please, please let me know ASAP if this cures your problem.
The essence of the problem seems to be the change to the method for saving using the view script. When a search or include is on the page that returns text that includes a %comment, the commonTagsHandler is called on the included/searched topic
before it is called on the topic being saved, but using the
same query so the "action=save" parameter is passed in. This "sub-request" call is distinguished from a "proper" call by virtue of the fact that the CGI query path_info is for the correct file, but the web and topic passed to the commonTagsHandler are for the included topic. Mindbending.
Thank you very much for finding and reporting this problem.
I will post a fixed version ASAP. The fixed version will include a requirement to install the
SharedModule, which has compatibility code for earlier releases.
--
CrawfordCurrie - 16 May 2004
Yes that works perfectly now with SEARCH.
It also works with INCLUDE. But if I INCLUDE a page that has a COMMENT box in it, and then leave a comment, it puts it in the INCLUDed page, and re-loads that page, not the original INCLUDing page. I think the behavior of putting the comment in the INCLUDed page (the one with the COMMENT box) makes sense, but I think it should reload the original page.
Anyway, thats minor, not a big deal, and possibly the correct behavior. I am happy :).
- Nevermind, this is the same behavior exhibited on the TWiki site -- KM
I am setting the
SupportStatus to
AnsweredQuestions
Thanks!
--
KenMankoff - 16 May 2004
Be aware that this is still not fixed in the latest version of the comment plugin.
--
ChristopherOezbek - 15 Sep 2005
Answer
Fixed. See comment (above) by
CrawfordCurrie dated 16 May 2004 with code excerpt.
--
KenMankoff - 17 May 2004