Ticket #3521 (reopened defect)

Opened 4 months ago

Last modified 3 months ago

Internal Error when logged out

Reported by: cgaert@gmx.de Assigned to: 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

Change History

(in reply to: ↑ description ) 08/08/08 10:17:15 changed by tsooboi

  • status changed from new to assigned.

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

(follow-up: ↓ 3 ) 08/08/08 12:00:28 changed by cgaert

anonymous hasn't any permissions because it's a private Trac installation.

(in reply to: ↑ 2 ) 08/08/08 13:05:11 changed by tsooboi

  • priority changed from high to low.
  • status changed from assigned to closed.
  • resolution set to invalid.
  • severity changed from blocker to trivial.

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

08/08/08 13:24:49 changed by tsooboi

  • priority changed from low to normal.
  • status changed from closed to reopened.
  • resolution deleted.
  • severity changed from trivial to minor.

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

08/09/08 03:32:31 changed by cgaert

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.

08/30/08 16:37:07 changed by pedro

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.


Add/Change #3521 (Internal Error when logged out)




Change Properties
Action