autocompleteusers - customselectadmin together are broken? is trac guilty or one of the plugins?

4 views
Skip to first unread message

rupert thurner

unread,
Jul 29, 2009, 8:54:07 AM7/29/09
to Trac Users
when enabling autocompleteusers we get the following error:

Trac detected an internal error:
AttributeError: 'CustomSelectPanel' object has no attribute
'get_htdocs_dirs'

on loading the javascript:
projects/myproject/chrome/autocompleteusers/js/autocomplete.js

if we disable http://trac-hacks.org/wiki/CustomSelectAdminPlugin,
http://trac-hacks.org/wiki/AutocompleteUsersPlugin works.

who is repsonsible for this, the plugin interface or one of the
plugins?

rupert.

Ethan Jucovy

unread,
Jul 29, 2009, 12:06:36 PM7/29/09
to trac-...@googlegroups.com
It looks like CustomSelectPanel implements ITemplateProvider[1] but doesn't implement the .get_htdocs_dirs method of the ITemplateProvider interface[2].  Is that method required by ITemplateProvider implementations?

You might try adding a noop `def get_htdocs_dirs(self): return []` to the class in customselectadmin.py to see if that fixes it.

egj

[1] http://trac-hacks.org/browser/customselectadminplugin/0.11/CustomSelectAdmin/customselectadmin.py#L9
[2] http://trac.edgewall.org/browser/trunk/trac/web/chrome.py#L241

rupert.thurner

unread,
Jul 29, 2009, 2:03:22 PM7/29/09
to Trac Users
thanks, this fixed it. i tried to commit it as well, but it seems i
have no rights, so i created http://trac-hacks.org/ticket/5587.

but i am wondering why trac queries the directory for static resources
which does not exist on every mouse click, or in this case, when
entering a name? i would have expected that it retrieves all the
directories when switching on the plugins, or starting up the server?

On Jul 29, 6:06 pm, Ethan Jucovy <ethan.juc...@gmail.com> wrote:
> It looks like CustomSelectPanel implements ITemplateProvider[1] but doesn't
> implement the .get_htdocs_dirs method of the ITemplateProvider
> interface[2].  Is that method required by ITemplateProvider implementations?
>
> You might try adding a noop `def get_htdocs_dirs(self): return []` to the
> class in customselectadmin.py to see if that fixes it.
>
> egj
>
> [1]http://trac-hacks.org/browser/customselectadminplugin/0.11/CustomSele...
> [2]http://trac.edgewall.org/browser/trunk/trac/web/chrome.py#L241
Reply all
Reply to author
Forward
0 new messages