Hi,

On 2024-04-04 09:50, Markus Rosjat wrote:
> maybe it would help to get some more information about what you tried so far, 
> like
>
> - what version you installed , trunk, pip 
> - a full traceback of the exceptions thrown 
>
> I guess then people could point out things easier 

Sure!

I use Trac 1.6 and httpauth module 1.2 with one change:

-    def post_process_request(self, req, template, content_type):
+    def post_process_request(self, req, template, data, content_type):

because there seems to be an additional parameter now.

As soon as I enable the module and reload a page, I get this backtrace:

2024-04-05 21:53:24,232 Trac[chrome] ERROR: Jinja2 UndefinedError error while 
rendering XML/HTML template 
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/trac/web/chrome.py", line 1569, in 
iterable_content
    for chunk in stream:
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1662, in 
__next__
    return self._next()  # type: ignore
           ^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1639, in 
_buffered_generator
    c = next(self._gen)
        ^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1354, in 
generate
    yield self.environment.handle_exception()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 936, in 
handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/usr/lib/python3/dist-packages/trac/wiki/templates/wiki_view.html", 
line 11, in top-level template code
    # extends 'layout.html'
  File "/usr/lib/python3/dist-packages/trac/templates/layout.html", line 12, in 
top-level template code
    # import "macros.html" as jmacros with context
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/trac/templates/theme.html", line 16, in 
top-level template code
    # block head
  File "/usr/lib/python3/dist-packages/trac/wiki/templates/wiki_view.html", 
line 26, in block 'head'
    #   set modify_perm = 'WIKI_MODIFY' in perm(page.resource)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 485, in 
getattr
    return getattr(obj, attribute)
           ^^^^^^^^^^^^^^^^^^^^^^^
UndefinedError: 'page' is undefined

Does this ring a bell?

Cheers

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/8734rz1mrc.fsf%40fama.lan.

Reply via email to