Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years 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

Description

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/chrome.py", line 1706, in _iterable_jinja_content
    for chunk in stream:
  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 1271, in __next__
    return self._next()
  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 1248, in _buffered_generator
    c = next(self._gen)
  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 1045, in generate
    yield self.environment.handle_exception(exc_info, True)
  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", 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 group.name and group.name != format_author(group.name))]
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 4 years 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 4 years ago by Cinc-th

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

comment:3 Changed 4 years 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
Action
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.