Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#12978 closed defect (worksforme)

Plugin fails to function with missing name in session

Reported by: ahowell82@… Owned by: Tetsuya Morimoto
Priority: normal Component: AutocompleteUsersPlugin
Severity: normal Keywords:
Cc: Ryan J Ollos, Jun Omae Trac Release:

Description

I have an instance where the plugin does not function. There is a user in the session table that does not have a display "name". While the entry is in the session table, I will only see the spinning gif; once I remove the session entry, the plugin begins to function

trac-admin . session list:

SID   Auth  Last Visit  Name Email
----------------------------------
doej  1     2016-12-02 

Debug Log

Trac[main] ERROR: Internal Server Error:
Traceback (most recent call last):
  File "[...]\trac-1.0.5-py2.7-win32.egg\trac\web\main.py", line 513, in _dispatch_request
    dispatcher.dispatch(req)
  File "[...]\trac-1.0.5-py2.7-win32.egg\trac\web\main.py", line 222, in dispatch
    resp = chosen_handler.process_request(req)
  File "[...]\tracautocompleteusersplugin-0.4.3dev-py2.7.egg\autocompleteusers\autocompleteusers.py", line 52, in process_request
    users = self._get_users(req)
  File "[...]\tracautocompleteusersplugin-0.4.3dev-py2.7.egg\autocompleteusers\autocompleteusers.py", line 156, in _get_users
    value = user_data[field].lower()
AttributeError: 'NoneType' object has no attribute 'lower'

Attachments (0)

Change History (2)

comment:1 Changed 8 years ago by Jun Omae

Resolution: worksforme
Status: newclosed

Wired. The issue couldn't be reproduced to me with missing name.

It's not a possibility that the user_data list includes None. If Chrome(self.env).format_author(req, user) in the following code could return None, the evaluated value would be an empty string.

149         # user names, email addresses, full names
150         users = []
151         for user_data in self.env.get_known_users():
152             user_data = [user is not None
153                          and Chrome(self.env).format_author(req, user) or ''
154                          for user in user_data]
155             for index, field in enumerate((USER, EMAIL, NAME)):  # ordered by how they appear
156                 value = user_data[field].lower()

I consider you are using modified AutocompleteUsersPlugin. Please reinstall the latest.

comment:2 Changed 8 years ago by howella

I did no think I was utilizing a modified version of the plugin. I will re-install version 0.4.3 and report any findings

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Tetsuya Morimoto.
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.