Modify

Opened 13 years ago

Last modified 10 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 13 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 13 years ago by Ryan J Ollos

Description: modified (diff)

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

  • DiaVisView.py

     
    1414import re
    1515import subprocess
    1616import Image
     17import time
    1718
    1819
    1920from genshi.builder import Element, tag
     
    171172                raise Exception('Dia execution failed.')
    172173
    173174            (png_file_size, png_file_time) = os.stat(png_path)[6:8]
     175            png_file_time = int(time.time()*1000000)
    174176            # Based on attachment.py, insert
    175177            db = self.env.get_db_cnx()
    176178            cursor = db.cursor()
Last edited 11 years ago by Jun Omae (previous) (diff)

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 10 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.