Problem with accountmanager and xmlrpc

45 views
Skip to first unread message

Martin

unread,
Nov 11, 2023, 6:40:51 AM11/11/23
to trac-...@googlegroups.com
Hi,

in the past (<= Trac 1.4), I had to use an additional plugin (httpauth)
to make xmlrpc work despite accountmanager being active. However, for
Trac 1.6 this plugin seems to be gone (or not ported to Python 3). I
understood, that accountmanager has been changed in a way that httpauth
is not needed anymore, but maybe I'm wrong. Anyone using accountmanager
and xmlrpc together successfully? How?

Cheers

Martin

unread,
Apr 3, 2024, 7:04:35 AMApr 3
to trac-...@googlegroups.com
Hi,

it seems, that I need HttpAuthPlugin to make (XML-) RPC work again on
Trac 1.6. It used to work fine in Trac 1.4 with the config

[httpauth]
paths = /xmlrpc, /login/xmlrpc

Are there any plans to port the plugin? I naively tried to update it
using `2to3`, but that did not work.

Thanks in advance for any help!

Cheers, Martin

Markus Rosjat

unread,
Apr 4, 2024, 3:50:55 AMApr 4
to trac-...@googlegroups.com
hi Martin,

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 

cheers 

Markus  

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/20240403130424.Horde.kvfAx9UYpmMoKoWmG9gbYkx%40webmail.in-berlin.de.

Martin

unread,
Apr 5, 2024, 6:13:41 PMApr 5
to trac-...@googlegroups.com
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

Jun Omae

unread,
Apr 9, 2024, 2:03:20 PMApr 9
to trac-...@googlegroups.com
On Sat, Apr 6, 2024 at 7:13 AM Martin <deb...@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.
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 <jun...@gmail.com> (大前 潤)

Martin

unread,
Apr 19, 2024, 4:54:38 PMApr 19
to trac-...@googlegroups.com
On 2024-04-10 03:02, Jun Omae wrote:
> The issue has been filed in https://trac-hacks.org/ticket/14250 and is
> fixed now.

Yes, the new version 1.3 works perfectly fine! Thank you so much!
Reply all
Reply to author
Forward
0 new messages