Opened 16 years ago
Closed 8 years ago
#3521 closed defect (wontfix)
Internal Error when logged out
Reported by: | Owned by: | tsooboi | |
---|---|---|---|
Priority: | normal | Component: | NavControlPlugin |
Severity: | minor | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
When I have the NavControlPlugin enabled and am not logged in I get this error on every page I try to load:
Trac detected an internal error: KeyError: 'mainnav'
That's another message on the error page (here I tried to load the login page):
The action that triggered the error was: GET: /login
I don't have the problem when I'm logged in. I use the AccountManagerPlugin with HtPasswdStore. Because I can't load the login page I can't login hence can't use Trac.
Attachments (0)
Change History (7)
comment:1 Changed 16 years ago by
Status: | new → assigned |
---|
comment:2 follow-up: 3 Changed 16 years ago by
anonymous hasn't any permissions because it's a private Trac installation.
comment:3 Changed 16 years ago by
Priority: | high → low |
---|---|
Resolution: | → invalid |
Severity: | blocker → trivial |
Status: | assigned → closed |
I tried this. I removed all permissions for anonymous in my private setup and disabled my plugin and got the same error.
This has nothing to do with my plugin.
You should enable WIKI_VIEW
permission for anonymous
to your trac setup.
- trac-admin in interactive mode
trac-admin /path/to/your/private/trac
- !add the permission as follows:
permission add anonymous WIKI_VIEW
This should enable you to go to the login page.
Again, it has nothing to do with the plugin. Thanks
comment:4 Changed 16 years ago by
Priority: | low → normal |
---|---|
Resolution: | invalid |
Severity: | trivial → minor |
Status: | closed → reopened |
Reopened because after further testing.
A quick fix will be to enable WIKI_VIEW
for anonymous
but I will take a look to see if there are other ways.
Thanks
comment:5 Changed 16 years ago by
Thanks, this helps.
I use the PrivateWikiPlugin and set WikiStart
as private. Now I can give WIKI_VIEW
permissions to anonymous
. With these settings anonymous
will not be able to see the Wiki but the login page. Now everything works as I expected.
comment:6 Changed 16 years ago by
if you change your post_process_request to
def post_process_request(self, req, template, data, content_type): if req.authname == 'anonymous': return template, data, content_type self._remove_items(req, 'mainnav') self._remove_items(req, 'metanav') self._move_items(req, 'main2meta') self._move_items(req, 'meta2main') self._relabel_items(req) return template, data, content_type
then the WIKI_VIEW permissions are not needed to login if you're using the AccountManagerPlugin. I also use the PermRedirectPlugin to redirect all permission errors to the login page.
comment:7 Changed 8 years ago by
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
Plugin is deprecated.
Replying to cgaert@gmx.de:
Can you provide your configuration setup and permissions for anonymous? I have this setup and it works without any problems when I'm either logged in or logged out. I also use the AccountManagerPlugin with HtPasswdStore.
Thanks