On Sat, Apr 6, 2024 at 7:13 AM Martin <deba...@debian.org> wrote:
> 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.

The issue has been filed in https://trac-hacks.org/ticket/14250 and is
fixed 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?

Unable to reproduce it. Also, it is not an issue of HttpAuthPlugin.
Please post the details of your environment (especially installed
plugins and configurations) and how to reproduce it.

-- 
Jun Omae <jun6...@gmail.com> (大前 潤)

-- 
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 trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/CAEVLMai0A2MOLs%3D0EiKpC%2BQyyTXcsL1%3DDF3xheimWhmoYaMsjw%40mail.gmail.com.

Reply via email to