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

pencil
Priority: Urgent
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component: CommentPlugin
Branches:
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
Codebase
SVN Range
AppliesTo Engine
Component CommentPlugin
Priority Urgent
CurrentState Closed
WaitingFor
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 Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy