Opened 21 months ago

Closed 21 months ago

Last modified 21 months ago

#13974 closed defect (fixed)

UndefinedError in version view Jinja template when clicking on version in roadmap

Reported by: Christopher Head Owned by: Cinc-th
Priority: normal Component: SimpleMultiProjectPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.4


When I go to the roadmap and click on the title of a version, I get a blank page with this traceback in the Trac log file:

2021-03-16 17:33:48,911 Trac[chrome] ERROR: Jinja2 UndefinedError error while rendering XML/HTML template 
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/trac/web/", line 1706, in _iterable_jinja_content
    for chunk in stream:
  File "/usr/lib/python2.7/dist-packages/jinja2/", line 1271, in __next__
    return self._next()
  File "/usr/lib/python2.7/dist-packages/jinja2/", line 1248, in _buffered_generator
    c = next(self._gen)
  File "/usr/lib/python2.7/dist-packages/jinja2/", line 1045, in generate
    yield self.environment.handle_exception(exc_info, True)
  File "/usr/lib/python2.7/dist-packages/jinja2/", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/var/lib/trac/.egg-cache/TracSimpleMultiProject-0.7.3-py2.7.egg-tmp/simplemultiproject/templates/version_view_jinja.html", line 9, in top-level template code
    # extends 'layout.html'
  File "/usr/local/lib/python2.7/dist-packages/trac/templates/layout.html", line 12, in top-level template code
    # import "macros.html" as jmacros with context
  File "/usr/local/lib/python2.7/dist-packages/trac/templates/theme.html", line 22, in top-level template code
    # block body
  File "/usr/local/lib/python2.7/dist-packages/trac/templates/theme.html", line 130, in block "body"
    # block content
  File "/var/lib/trac/.egg-cache/TracSimpleMultiProject-0.7.3-py2.7.egg-tmp/simplemultiproject/templates/version_view_jinja.html", line 85, in block "content"
    #   set interval_hrefs = (group.interval_hrefs, None) [bool(grouped_by in ['owner', 'reporter'] and and != format_author(]
UndefinedError: 'bool' is undefined

This is with Trac 1.4.2 and using the 0.7.3 tag of SMP.

Attachments (0)

Change History (3)

comment:1 Changed 21 months ago by Cinc-th

Resolution: fixed
Status: newclosed

In 18074:

SimpleMultiProjectPlugin: don't use unsupported function bool() in Jinja2 template.

Closes #13974

comment:2 Changed 21 months ago by Cinc-th

Note that the version number of the plugin has changed in trunk.

comment:3 Changed 21 months ago by Cinc-th

In 18091:

SimpleMultiProjectPlugin: added test case for version page template.

Refs #13974

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Cinc-th.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

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

Note: See TracTickets for help on using tickets.