You are here: Foswiki>Tasks Web>Item2265 (09 Mar 2010, GeorgeClark)Edit Attach

Item2265: On Windows, Foswiki::Func::saveAttachment appears to call the commonTagsHandler

pencil
Priority: Low
Current State: No Action Required
Released In:
Target Release: n/a
Applies To: Engine
Component:
Branches:
Reported By: GeorgeClark
Waiting For:
Last Change By: GeorgeClark
Debugging a problem with the DirectedGraphPlugin, it appears that on Windows, when the plugin calls the Foswiki::Func::saveAttachment function to attach a generated file, it results in a recursive call to the commonTagsHandler and afterCommonTagsHandler. This call does not happen on Linux.

Foswiki 1.0.7 on Windows - debug output

| 2009-10-17T02:38:55Z debug | DirectedGraphPlugin - ### forceAttachAPI = &vbar;off&vbar;  attachPath = &vbar;&vbar;  |
| 2009-10-17T02:38:55Z debug | DirectedGraphPlugin - attaching DirectedGraphPlugin_4.png using Foswiki API  |
| 2009-10-17T02:38:57Z debug | DirectedGraphPlugin - - DirectedGraphPlugin::commonTagsHandler( System.DirectedGraphPlugin ) length= 43  |
| 2009-10-17T02:38:57Z debug | DirectedGraphPlugin -  <<< EXIT  commonTagsHandler - Graphs found 0   |

Same plugin run on Foswiki 1.0.7 on Linux

| 2009-10-17T03:11:58Z debug | DirectedGraphPlugin - ### forceAttachAPI = &vbar;off&vbar;  attachPath = &vbar;&vbar;  |
| 2009-10-17T03:11:58Z debug | DirectedGraphPlugin - attaching DirectedGraphPlugin_4.png using Foswiki API  |
| 2009-10-17T03:11:58Z debug | DirectedGraphPlugin - attaching DirectedGraphPlugin_4.pdf using Foswiki API  |

I can fix the plugin by testing to be sure that the calls to the tagsHandler routines are bypassed when processing a file attachment, but I don't believe that it is supposed to work this way and might break other plugins on Windows.


Added debug code to the plugin to die if called recursively. Rebooted windows VM, and now the problem is not happening. No hint about why it was failing previously.


Closing this as No Action required. I've not seen any more recurrences of this issue - Probably a local issue.

ItemTemplate edit

Summary On Windows, Foswiki::Func::saveAttachment appears to call the commonTagsHandler
ReportedBy GeorgeClark
Codebase 1.0.7
SVN Range Foswiki-1.0.7, Sun, 20 Sep 2009, build 5061
AppliesTo Engine
Component
Priority Low
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn
Topic revision: r3 - 09 Mar 2010, GeorgeClark
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