NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use trunk.foswiki.org to view this page for some minimal testing.
Use Item9693 for docu changes for 1.2 and 2.0.

Item11017: Redundant afterSaveHandler called before renaming

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Closed Engine    
I noticed when moving a topic to Trash. FW is not creating a topic in Trash first, it first calls afterSaveHandler with the current web as web parameter.

This makes it difficult to keep a separate database in sync because there is no way to tell from the called afterSaveHandler what kind of save this was.

-- ArthurClemens - 02 Aug 2011

This happens because of this save call in line 2167:

$from->save();    # to save the metadata change
$from->{_session}->{store}->moveTopic( $from, $to, $cUID );

This call is used to store TOPICMOVED info. But do we really want to call beforeSaveHandler and afterSaveHandler with that (old) topic change?

Proposed new way:
# save the metadata change without logging
$this->saveAs(
    $this->{_web}, $this->{_topic},
    dontlog => 1, # no statistics
);

-- ArthurClemens - 04 Aug 2011

 

ItemTemplate edit

Summary Redundant afterSaveHandler called before renaming
ReportedBy ArthurClemens
Codebase 1.1.3, trunk
SVN Range
AppliesTo Engine
Component
Priority Normal
CurrentState Closed
WaitingFor
Checkins Foswikirev:12260 Foswikirev:12261 Foswikirev:12262
TargetRelease patch
ReleasedIn 1.1.4
Topic revision: r8 - 17 Dec 2011, GeorgeClark
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads