Modify

Opened 12 years ago

Last modified 9 years ago

#9935 new defect

Doesn't refresh PNG which substitutes the expanded macro

Reported by: root@… Owned by:
Priority: normal Component: DiaVisViewPlugin
Severity: critical Keywords:
Cc: Trac Release: 0.12

Description (last modified by Ryan J Ollos)

Scenario:

  1. Put [[DiaVisView(a.dia)]] to the wiki page.
  2. Attach a diagram a.dia.
  3. Autogenerated raster file a.png is created and displayed on the page.
  4. Attach an updated diagram a.dia, replacing the old one.
  5. Autogenerated raster a.png is updated in filesystem but the page shows the old one.

Attachments (0)

Change History (5)

comment:1 Changed 12 years ago by root@…

  • 0.11/DiaVisView/DiaVisView.py

    Author: Al Nikolov <root@toor.fi.eu.org>
    Subject: Fixes PNG URL link
    Closes: #9935
    
    a b  
    208208        if style:
    209209            attr['style'] = '; '.join(['%s:%s' % (k, escape(v))
    210210                                       for k, v in style.iteritems()])
    211         result = tag.img(src=png_url + "?format=raw", **attr)
     211        result = tag.img(src=png_url.replace("/attachment/", "/raw-attachment/"), **attr)
    212212        if link is not None:
    213213            result = tag.p(result, href=link or url,
    214214                           style='padding:2; border:none')
Last edited 11 years ago by Ryan J Ollos (previous) (diff)

comment:2 Changed 12 years ago by Ryan J Ollos

Description: modified (diff)

comment:3 Changed 11 years ago by regis.patroix@…

--- DiaVisView.py 2010-06-08 16:53:20.000000000 +0200 +++ DiaVisView.py 2013-06-28 11:57:00.000000000 +0200 @@ -14,6 +14,7 @@

import re import subprocess import Image

+import time

from genshi.builder import Element, tag

@@ -171,6 +172,7 @@

raise Exception('Dia execution failed.')

(png_file_size, png_file_time) = os.stat(png_path)[6:8]

+ png_file_time = int(time.time()*1000000)

# Based on attachment.py, insert db = self.env.get_db_cnx() cursor = db.cursor()

Version 0, edited 11 years ago by regis.patroix@… (next)

comment:4 Changed 11 years ago by Ryan J Ollos

Summary: Doesn't refresh PNG whitch substitutes the expanded macroDoesn't refresh PNG which substitutes the expanded macro

comment:5 Changed 9 years ago by Ryan J Ollos

Owner: robert_martin deleted

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.