#14059 closed defect (duplicate)
UndefinedError: 'item' is undefined
| Reported by: | anonymous | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | CrystalxTheme |
| Severity: | normal | Keywords: | |
| Cc: | Trac Release: | 1.4 |
Description
Just after crystalxtheme.* = enabled
Traceback (most recent call last):
File "venvp27/lib/python2.7/site-packages/trac/web/main.py", line 684, in _send_error
data, metadata)
File "venvp27/lib/python2.7/site-packages/trac/web/chrome.py", line 1443, in render_template
fragment, iterable, method)
File "venvp27/lib/python2.7/site-packages/trac/web/chrome.py", line 1535, in _render_jinja_template
iterable)
File "venvp27/lib/python2.7/site-packages/trac/web/chrome.py", line 1656, in generate_template_stream
return b''.join(generate())
File "venvp27/lib/python2.7/site-packages/trac/web/chrome.py", line 1654, in generate
for chunk in stream:
File "venvp27/lib/python2.7/site-packages/jinja2/environment.py", line 1357, in __next__
return self._next()
File "venvp27/lib/python2.7/site-packages/jinja2/environment.py", line 1334, in _buffered_generator
c = next(self._gen)
File "venvp27/lib/python2.7/site-packages/jinja2/environment.py", line 1125, in generate
yield self.environment.handle_exception()
File "venvp27/lib/python2.7/site-packages/jinja2/environment.py", line 832, in handle_exception
reraise(*rewrite_traceback_stack(source=source))
File "venvp27/lib/python2.7/site-packages/trac/templates/error.html", line 95, in top-level template code
<input type="submit" name="create" value="${_('Create')}" />
File "venvp27/lib/python2.7/site-packages/trac/templates/layout.html", line 12, in top-level template code
# import "macros.html" as jmacros with context
File "venvp27/lib/python2.7/site-packages/crystalxtheme/templates/crystalx_theme.html", line 13, in top-level template code
class="${classes(first_last(idx, chrome.nav[category]), active=item.active)}">${item.label}</li>
File "venvp27/lib/python2.7/site-packages/jinja2/environment.py", line 471, in getattr
return getattr(obj, attribute)
UndefinedError: 'item' is undefined
Attachments (0)
Change History (9)
comment:1 Changed 4 years ago by
| Priority: | highest → normal |
|---|---|
| Severity: | critical → normal |
comment:3 Changed 4 years ago by
Can be explained situation?
\lib\python2.7\site-packages\trac\templates\genshi\index.html - this is genshi
\lib\python2.7\site-packages\trac\templates\index.html - this is Jinja2 solution ?
comment:4 Changed 4 years ago by
It's not compatible with Trac 1.4 (Jinja). Someone needs to port the templates. See comment:2:ticket:13761.
comment:5 follow-up: 8 Changed 4 years ago by
I see.. I'm looking some simple solution to have template like main trac.edgewall.org (as table in center with gray frame borders, and set sizes for this center). The BasicThemeEditorPlugin not working for me.
comment:6 Changed 4 years ago by
Most of plugins have this type problem:
Collecting https://trac-hacks.org/browser/basicthemeeditorplugin?rev=18451
Downloading https://trac-hacks.org/browser/basicthemeeditorplugin?rev=18451
/ 14 kB 248 kB/s
ERROR: Cannot unpack file /tmp/pip-unpack-ESFr17/basicthemeeditorplugin (downloaded from /tmp/pip-req-build-nvoY1m, content-type: text/html;charset=utf-8); cannot detect archive format
ERROR: Cannot determine archive format of /tmp/pip-req-build-nvoY1m
In case I do install in manual. Sorry for off top here.
comment:7 Changed 4 years ago by
$ pip install svn+https://trac-hacks.org/svn/basicthemeeditorplugin/trunk
Note that BasicThemeEditorPlugin may not be compatible with Trac 1.4. Check the tags on the wiki page. BasicThemeEditorPlugin is labeled with only the 0.11 tag. It might work with 1.4, but likely not.
comment:8 Changed 4 years ago by
Replying to anonymous:
I see.. I'm looking some simple solution to have template like main trac.edgewall.org (as table in center with gray frame borders, and set sizes for this center). The BasicThemeEditorPlugin not working for me.
Please ask on the trac:MailingList and someone can help with theme'ing your Trac install.
comment:9 Changed 4 years ago by
In case it was instaled not working like in comment in your post. In my opinion to much plugins not working with Trac 1.4 as stable.. right? Then trac is limited to manage and configure to typical needs to usage.



Duplicate of #13761?