From: Donkin, R. <rd...@or...> - 2002-11-22 12:58:58
|
Hi Peter, Can you give some examples of such plugins that are needed under mailnotify? I think it would be best if plugins had to explicitly ask to run under mailnotify, as most of them don't seem relevant (e.g. TreePlugin, SessionPlugin, Xp tracking, action tracking, etc.) Cheers, Richard > -----Original Message----- > From: Peter Thoeny [mailto:pet...@at...] > Sent: 22 November 2002 05:59 > To: Donkin, Richard; TWi...@li... > Subject: Re: [TWiki-Dev] mailnotify - bug? > > > All: > > I see it differently: Some Plugins need to run also > when called by a cron job. Each Plugins that depends > on the cgi variable needs to make sure that the > variable is set. > > Regards, > Peter > > > "Donkin, Richard" wrote: > > > > Hi, > > > > Your fix looks reasonable - plugins should make sure that > they can handle an > > undef or zero result from TWiki::Func::getCgiQuery, I > think. This does > > raise the larger issue of whether plugins should be running > under mailnotify > > at all - since it just generates the equivalent of > WebChanges in HTML. > > Probably plugins should be disabled by default under > mailnotify, and enabled > > only by sites that have complex skins that require plugins to render > > WebChanges. > > > > It's best to put this message into the TWiki Codev web btw > - let's continue > > the discussion there so it is more visible. Also a good > idea to put a note > > on the TreePlugin page... > > > > Richard > > > > > -----Original Message----- > > > From: Brian Wallis [mailto:bri...@ot...] > > > Sent: 20 November 2002 22:18 > > > To: TWi...@li... > > > Subject: [TWiki-Dev] mailnotify - bug? > > > > > > > > > > > > In getting an installation of TWiki20020803beta running I had > > > a problem with > > > mailnotify not working, i got the following from the cron job > > > running it: > > > > > > ---------------- > > > From: ww...@sa...l.ot [mailto:ww...@sa...l.ot] > > > Sent: Wednesday, 20 November 2002 3:15 PM > > > To: ww...@sa...l.ot > > > Subject: Output from "cron" command > > > > > > > > > Your "cron" job on saturn > > > (cd /usr/local/htdocs/twiki/bin; ./mailnotify ) > > > > > > produced the following output: > > > > > > Can't call method "query_string" on an undefined value at > > > ../lib/TWiki/Plugins/TreePlugin.pm line 66. > > > TWiki mail notification > > > - to suppress all normal output: mailnotify -q > > > ---------------- > > > > > > I've patched TreePlugin to avoid the problem (patches at end) > > > but I am not > > > sure if this is a real bug or a symptom of something else > not setup > > > correctly. The problem seems to be that > > > TWiki::Func::getCgiQuery() doesn't > > > return anything, which is not surprising since mailnotify is > > > not a cgi > > > invoked script. The patch leaves $CurrUrl undefined but this > > > doesn't seem to > > > cause any problems (yet). > > > > > > brian wallis... > > > > > > ---------------- > > > % diff -c lib/TWiki/Plugins/TreePlugin.pm.orig > > > lib/TWiki/Plugins/TreePlugin.pm > > > /sr/saturn/twiki > > > *** lib/TWiki/Plugins/TreePlugin.pm.orig Wed Nov 20 > > > 15:45:54 2002 > > > --- lib/TWiki/Plugins/TreePlugin.pm Wed Nov 20 15:47:48 2002 > > > *************** > > > *** 63,71 **** > > > # mod_perl will have trouble because these three vals > > > are globals > > > %TreeTopics = (); > > > $CgiQuery = &TWiki::Func::getCgiQuery(); > > > ! my $plist = $CgiQuery->query_string(); > > > $plist .= "\&" if $plist; > > > $CurrUrl = $CgiQuery->url . $CgiQuery->path_info() . > > > "?" . $plist; > > > # $CurrUrl =~ s/\&/\&/go; > > > > > > # Plugin correctly initialized > > > --- 63,73 ---- > > > # mod_perl will have trouble because these three vals > > > are globals > > > %TreeTopics = (); > > > $CgiQuery = &TWiki::Func::getCgiQuery(); > > > ! if(defined $CgiQuery) { > > > ! my $plist = $CgiQuery->query_string(); > > > $plist .= "\&" if $plist; > > > $CurrUrl = $CgiQuery->url . $CgiQuery->path_info() . > > > "?" . $plist; > > > + } > > > # $CurrUrl =~ s/\&/\&/go; > > > > > > # Plugin correctly initialized > > > > > > > > > > > > ------------------------------------------------------- > > > This sf.net email is sponsored by: > > > Battle your brains against the best in the Thawte Crypto > > > Challenge. Be the first to crack the code - register now: > > > http://www.gothawte.com/rd521.html > > > _______________________________________________ > > > TWiki-Dev mailing list > > > TWi...@li... > > > https://lists.sourceforge.net/lists/listinfo/twiki-dev > > > > > > > -- > > This communication contains confidential information > intended solely for the use of the individual/s and/or entity > or entities to whom it was intended to be addressed. If you > are not the intended recipient, be aware that any disclosure, > copying, distribution, or use of the contents of this > transmission is prohibited. If you have received this > communication in error, please contact the sender > immediately, delete this communication from your system, and > do not disclose its contents to any third party, or use its > contents. Any opinions expressed are solely those of the > author and do not necessarily represent those of Orchestream > Ltd or its group of companies unless otherwise specifically stated. > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > TWiki-Dev mailing list > > TWi...@li... > > https://lists.sourceforge.net/lists/listinfo/twiki-dev > -- This communication contains confidential information intended solely for the use of the individual/s and/or entity or entities to whom it was intended to be addressed. If you are not the intended recipient, be aware that any disclosure, copying, distribution, or use of the contents of this transmission is prohibited. If you have received this communication in error, please contact the sender immediately, delete this communication from your system, and do not disclose its contents to any third party, or use its contents. Any opinions expressed are solely those of the author and do not necessarily represent those of Orchestream Ltd or its group of companies unless otherwise specifically stated. |