group Next Big Thing: Register for the Foswiki Camp 2015 now. ... group Annual Foswiki Association meeting: Friday 20th March 2015 at 1300Z

Item8611: A COMMENT gets applied again when a save is invoked from an afterSaveHandler

Priority: Urgent
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component: CommentPlugin
Reported By: CrawfordCurrie
Waiting For:
Last Change By: KennethLavrsen
COMMENT uses the beforeSaveHandler to re-read the topic and insert the comment. It gets the comment from the URL params. But if we have the scenario where another plugin has an afterSaveHandler which saves a different topic, then the beforeSaveHandler in the CommentPlugin will end up inserting the comment again.

The workaround is for the calling plugin to ensure that any URL params are removed from the request before saving any further topics. The fix is for CommentPlugin to remove those same params after it has processed them once.

-- CrawfordCurrie - 24 Feb 2010


ItemTemplate edit

Summary A COMMENT gets applied again when a save is invoked from an afterSaveHandler
ReportedBy CrawfordCurrie
SVN Range
AppliesTo Engine
Component CommentPlugin
Priority Urgent
CurrentState Closed
Checkins distro:68c5c2951ea1
TargetRelease minor
ReleasedIn 1.1.0
Topic revision: r4 - 04 Oct 2010, KennethLavrsen

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License