Modify

Opened 13 years ago

Closed 13 years ago

#9575 closed defect (duplicate)

WorkflowPlugin breaks when no Accept-Language header is sent

Reported by: Matthijs Kooijman Owned by: Takanori Suzuki
Priority: normal Component: WorkflowEditorPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

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/main.py", line 423, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 197, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.5/site-packages/trac/admin/web_ui.py", line 81, in process_request
    panels, providers = self._get_panels(req)
  File "/usr/lib/python2.5/site-packages/trac/admin/web_ui.py", 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/workfloweditor_admin.py", 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/api.py", 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 13 years ago by Matthijs Kooijman

Resolution: duplicate
Status: newclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Takanori Suzuki.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.