Tags:
create new tag
view all tags

Feature Proposal: Make SaveAttachment not trigger TWiki::Plugins::dispatch

Motivation

Resolve DirectGraphPlugin's conflict issue with other plugins.

Description and Documentation

When viewing a page with a DirectGraphPlugin, DirectGraphPlugin's commonTagHandler invokes "TWiki::Store::saveAttachment" to attach generated image files to a topic, which triggers "beforeAttachmentSaveHandler" and "afterAttachmentSaveHandler". This might cause conflicts with plugins which handle "beforeAttachmentSaveHandler" and "afterAttachmentSaveHandler". To resolve this problem, dispatching these to handlers should be optional in "TWiki::Store::saveAttachment" subroutine.

Examples

Impact

Implementation

-- Contributors: Yaojun Fei - 2013-05-27

Discussion

Not sure if disabling the callback is the right approach. This increases the complexity if the API.

What problems do you get if the DirectGraphPlugin attaches images via official API?

Possibly change the DirectGraphPlugin? The ChartPlugin for example creates image files directly in the topic's attachment directory, without using the API.

-- Peter Thoeny - 2013-05-27

We have a RTNotifyPlugin which notifys subscribed users of the changed topics. It handles afterAttachmentSaveHandler. And in that handler, it expands the target topic to retrieve the changes since its last version, which will invokes back to DirectGraphHandler's commonTagHandler. I agree with you that making it generate images in the same way as ChartPlugin will resolve this issue in a more clean way.

-- Yaojun Fei - 2013-05-27

As discussed in JerusalemReleaseMeeting2013x05x30, this feature is no longer needed because the custom plugin will generate image files directly, in a similar way like the ChartPlugin.

-- Peter Thoeny - 2013-05-31

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2013-05-31 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.