Below text is carried over from a TWiki-Dev discussion.
--
PeterThoeny - 25 Nov 2002
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.
--
RichardDonkin - 22 November 2002
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.
--
PeterThoeny - 25 Nov 2002
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.)
--
RichardDonkin - 22 November 2002
At work we have a script called by a nightly cron job that generates static
HTML pages from TWiki topics. Topics that have calendars (
CalendarPlugin), charts (
ChartPlugin), gauges (
GaugePlugin), formulas (
SpreadSheetPlugin), action items (
ActionTrackerPlugin) etc need to get rendered correctly into
HTML. The
TablePlugin currently bails out if not called from a cgi script, leaving
%TABLE{...}% in the rendered
HTML text.
If
WebNotifyToSendActualChanges is implemented we also need the Plugins rendering if invoked from a shell script.
The current spec is the most flexible, Plugins should decide if they render if not called by a cgi script.
--
PeterThoeny - 25 Nov 2002
I agree about plugins being able to decide whether they run or not, but mailnotify should just be able to say 'no plugins' (like disabling all plugins in
TWikiPreferences) - otherwise it will break with existing plugins that don't react well when not run under
CGI. And there needs to be better documentation of the fact that plugins may be run under non-CGI scripts.
--
RichardDonkin - 25 Nov 2002