Modify

Opened 8 years ago

Last modified 8 years ago

#718 new defect

Pluging crashes with "Unknown function html_escape called"

Reported by: pickscrape Owned by: coderanger
Priority: normal Component: SimileTimelinePlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

When attempting to run the plugin, I get the following error in the trac log:

2006-09-14 19:08:05,531 Trac[main] ERROR: ParseError: [/home/httpd/.python-eggs/TracSimileTimeline-0.1-py2.4.egg-tmp/stimeline/templates/stimeline_xml.cs:3] Unknown function html_escape called
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 335, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 225, in dispatch
    req.display(template, content_type or 'text/html')
  File "/usr/lib/python2.4/site-packages/trac/web/api.py", line 329, in display
    data = self.hdf.render(template)
  File "/usr/lib/python2.4/site-packages/trac/web/clearsilver.py", line 288, in render
    template.parseFile(filename)
ParseError: ParseError: [/home/httpd/.python-eggs/TracSimileTimeline-0.1-py2.4.egg-tmp/stimeline/templates/stimeline_xml.cs:3] Unknown function html_escape called

I am running trac trunk, and updated to the latest version a couple of days ago.

Attachments (0)

Change History (4)

comment:1 Changed 8 years ago by coderanger

What version of ClearSilver are you running? That function was added 0.7.0.

comment:2 follow-up: Changed 8 years ago by pickscrape

I had 0.9.7.

Upgrading to 0.10.2 fixed that problem, thanks.

However, the timelone now shows no data, with nothing in the error log.

comment:3 in reply to: ↑ 2 Changed 8 years ago by barabbas@…

Replying to pickscrape:

However, the timelone now shows no data, with nothing in the error log.

I encountered the same problem in 0.10.

comment:4 Changed 8 years ago by diroussel

I've got the same problem in Trac 0.10

2007-05-10 11:32:44,983 Trac[main] ERROR: ParseError: [C:\dev\python-2.4\egg-cache\tracsimiletimeline-0.1-py2.4.egg-tmp\stimeline\templates/stimeline_xml.cs:3] Unknown function html_escape called
Traceback (most recent call last):
  File "C:\dev\python-2.4\lib\site-packages\trac\web\main.py", line 356, in dispatch_request
    dispatcher.dispatch(req)
  File "C:\dev\python-2.4\lib\site-packages\trac\web\main.py", line 228, in dispatch
    req.display(template, content_type or 'text/html')
  File "C:\dev\python-2.4\lib\site-packages\trac\web\api.py", line 353, in display
    data = self.hdf.render(template)
  File "C:\dev\python-2.4\lib\site-packages\trac\web\clearsilver.py", line 288, in render
    template.parseFile(filename)
ParseError: ParseError: [C:\dev\python-2.4\egg-cache\tracsimiletimeline-0.1-py2.4.egg-tmp\stimeline\templates/stimeline_xml.cs:3] Unknown function html_escape called

I managed to patch it with this patch to not do any escaping:

Index: stimeline/templates/stimeline_xml.cs
===================================================================
--- stimeline/templates/stimeline_xml.cs	(revision 2234)
+++ stimeline/templates/stimeline_xml.cs	(working copy)
@@ -1,5 +1,5 @@
 <data>
     <?cs each:e = timeline.events ?>
-    <event start="<?cs var:e.date ?> <?cs var:e.time ?>" title="<?cs var:html_escape(e.title) ?>" link="<?cs var:e.href ?>" icon="<?cs var:e.icon ?>"><?cs var:e.message?></event>
+    <event start="<?cs var:e.date ?> <?cs var:e.time ?>" title="<?cs var:e.title ?>" link="<?cs var:e.href ?>" icon="<?cs var:e.icon ?>"><?cs var:e.message?></event>
     <?cs /each ?>
 </data>

It works now, with these problems:

  • Initial view centers on wrong date, I have to scroll alot to find any data
  • No icons on items

Add Comment

Modify Ticket

Action
as new The owner will remain coderanger.
Author


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

 
Note: See TracTickets for help on using tickets.