Opened 3 years ago

Closed 3 years ago

#9575 closed defect (duplicate)

WorkflowPlugin breaks when no Accept-Language header is sent

Reported by: Matthijs Kooijman <matthijs@…> Owned by: takanorig
Priority: normal Component: WorkflowEditorPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11


When trying to do some (ugly, yes) script making HTTP to the trac admin, I ran into 500 internal server errors in the admin. I had set up the auth_token cookie correctly, but got 500's. Looking in the trac.log file, I found:

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/trac/web/", line 423, in _dispatch_request
  File "/usr/lib/python2.5/site-packages/trac/web/", line 197, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.5/site-packages/trac/admin/", line 81, in process_request
    panels, providers = self._get_panels(req)
  File "/usr/lib/python2.5/site-packages/trac/admin/", line 160, in _get_panels
    p = list(provider.get_admin_panels(req))
  File "/var/data/trac/fon-ng/plugins/WorkflowEditorPlugin-1.0.2_r6348-py2.5.egg/workfloweditor/", line 32, in get_admin_panels
    locale = LocaleUtil().get_locale(req)
  File "/var/data/trac/fon-ng/plugins/WorkflowEditorPlugin-1.0.2_r6348-py2.5.egg/workfloweditor/", line 16, in get_locale
    if (len(locale_array) > 0):
TypeError: object of type 'NoneType' has no len()

Adding an Accept-Language header prevents this error. I have no time for a patch right now, but it would be nice if the workflow plugin could cope with this situation.

Attachments (0)

Change History (1)

comment:1 Changed 3 years ago by Matthijs Kooijman <matthijs@…>

  • Resolution set to duplicate
  • Status changed from new to closed

Crap, never mind. This was reported in #6645 and fixed in r9979 already. Should have looked more closely, sorry.

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.