You are here: Foswiki>Tasks Web>Item2069 (01 Oct 2009, GeorgeClark)Edit Attach

Item2069: Viewing page causes metadata to change

Priority: Normal
Current State: No Action Required
Released In:
Target Release: n/a
Applies To: Extension
Component: DirectedGraphPlugin
Reported By: VickiBrown
Waiting For: Main.VickiBrown
Last Change By: GeorgeClark
Simply viewing a page that uses DirectedGraphPlugin causes the attachment revinfo (and thus, the topic's revinfo) to change.

After I view the page, if I click "Attach" I now "own" the attachment, DirectedGraphPlugin_1.png and the datestamp of the attachment has been updated.

Viewing revision history shows one change in the metadata:


META FILEATTACHMENT     attachment="DirectedGraphPlugin_1.png" attr="h" comment="DirectedGraphPlugin: DOT graph" date="1251960646" 
name="DirectedGraphPlugin_1.png" size="9244" stream="GLOB(0xa57b464)" tmpFilename="/tmp/ruGI21pMsZ" user="madz" version="1"
META REVCOMMENT    comment_1="Attached file DirectedGraphPlugin_1.png" comment_2="Attached file DirectedGraphPlugin_1.png" 
minor_1="0" minor_2="0" ncomments="2" rev_1="46" rev_2="" t_1="Upload1251436105" t_2="Upload1251960646"


META FILEATTACHMENT    attachment="DirectedGraphPlugin_1.png" attr="h" comment="DirectedGraphPlugin: DOT graph" date="1252957070" 
name="DirectedGraphPlugin_1.png" size="9244" stream="GLOB(0xa9fc39c)" tmpFilename="/tmp/oZdMGEtWor" user="vbrown" version="1"
META REVCOMMENT    comment_1="Attached file DirectedGraphPlugin_1.png" comment_2="Attached file DirectedGraphPlugin_1.png" 
comment_3="Attached file DirectedGraphPlugin_1.png" minor_1="0" minor_2="0" minor_3="0" ncomments="3" rev_1="48" rev_2="48" 
rev_3="" t_1="Upload1252955920" t_2="Upload1252956917" t_3="Upload1252957070"

-- VickiBrown - 14 Sep 2009

What release of plugin, what release of Foswiki?

This is somewhat working as designed. If for any reason the <dot> source changes, or is detected as changed, the attachments are regenerated.

Does the <dot input contain anything that would dynamically change? For example, a date or timestamp that would expand into the dot source resulting in a change? Or any other dynamic source - topic includes, etc? Another issue could be putting the topic revision info into the graph. Updating the topic, changes the rev, which updates the graph, which attaches the file, which updates the rev.... You get the idea.

If you enable debug, you can see if the plugin believes that the source changed. For example, if you see something like:

| 07 Dec 2008 - 23:06 | DirectedGraphPlugin - DirectedGraphPlugin_1: oldhash = b4139899a01e1012526c81d69e44e437  newhash = b4139899a01e1012526c81d69e44e437

The old and new hashes are the same, so as long as the attachment exists, it should NOT get updated.

If something has changed, you'll see something like:

2009-09-14T02:47:44Z debug | DirectedGraphPlugin - DirectedGraphPlugin_1: oldhash = 34edb4abd802e224959e65cf89dd4a1c  newhash = 1cbfde1ff93626df9da87a63cbd955c0 | | 2009-09-14T02:47:44Z debug | DirectedGraphPlugin -  >>> Processing changed dot tag or missing file DirectedGraphPlugin_1.svg <<< |

The other thing that could cause this is if for some reason the working directory was lost. The hash files are kept in working.

If you have dynamic content in the graphs and you do not want the topic to be updated, using the expert config settings you can set path for the attachments and the plugin will not use the Foswiki API for updating the attachments. It's much faster too, but you loose revision info on the attachments.

What release of plugin? (Dakar, $Rev: 17659 (12 Dec 2008)

What release of Foswiki? TWiki 4.2.4 actually. We're still on TWiki, will migrate eventually. I copy all of our TWiki bugs here, especially for extension problems. (Unless you've rewritten from scratch, much of this will match and I don't want Foswiki to be bug-for-bug compatible.)

I'm closing this for now. The DirectedGraphPlugin on Foswiki has changed significantly from the TWiki version. If you can recreate the problem on Foswiki, please reopen this.

-- GeorgeClark - 01 Oct 2009

ItemTemplate edit

Summary Viewing page causes metadata to change
ReportedBy VickiBrown
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component DirectedGraphPlugin
Priority Normal
CurrentState No Action Required
WaitingFor VickiBrown
TargetRelease n/a
Topic revision: r4 - 01 Oct 2009, 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