Opened 16 years ago

Closed 15 years ago

#899 closed defect (fixed)

templates not found when plugin enabled

Reported by: trep@… Owned by: Matt Good
Priority: high Component: AccountManagerPlugin
Severity: major Keywords:
Cc: Trac Release: 0.11


when i installed the account manager plugin for .11dev i enabled it and now i get the following error when i try to visit the admin page or the login page:

 Trac detected an internal error:

TemplateNotFound: Template "admin_accountsconfig.html" not found

If you think this should work you can reproduce the problem, you should consider reporting this to the Trac team.

Before you do that, though, please first try searching for similar issues, as it is quite likely that this problem has been reported before. For questions about installation and configuration of Trac, please try the mailing list instead of filing a ticket.

Otherwise, please ==== How to Reproduce ==== While doing a GET operation on `/admin`, Trac issued an internal error. ==== System Information ==== || '''Python''' || `2.3.4 (#1, Feb 6 2006, 10:38:46) `[[br]]`[GCC 3.4.5 20051201 (Red Hat 3.4.5-2)]`[[br]] || || '''SQLite''' || `3.3.8` || || '''pysqlite''' || `2.0.7` || ==== Python Traceback ==== {{{ Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/trac/web/", line 387, in dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.3/site-packages/trac/web/", line 220, in dispatch content_type) File "/usr/lib/python2.3/site-packages/trac/web/", line 486, in render_template template = self.load_template(filename, method=method) File "/usr/lib/python2.3/site-packages/trac/web/", line 470, in load_template return self.templates.load(filename, cls=cls) File "build/bdist.linux-i686/egg/genshi/template/", line 182, in load TemplateNotFound: Template "admin_accountsconfig.html" not found }}} a new ticket at the Trac project site, where you can describe the problem and explain how to reproduce it.
System Information:
Python: 	2.3.4 (#1, Feb 6 2006, 10:38:46) [GCC 3.4.5 20051201 (Red Hat 3.4.5-2)]
SQLite: 	3.3.8
pysqlite: 	2.0.7
Python Traceback
Most recent call last:

    * File "/usr/lib/python2.3/site-packages/trac/web/", line 387, in dispatch_request
      Code fragment:
       381. req = Request(environ, start_response)
       382. try:
       383. try:
       384. try:
       385. dispatcher = RequestDispatcher(env)
       386. dispatcher.dispatch(req)
       387. except RequestDone:
       388. pass
       389. return req._response or []
       390. finally:
       391. if not environ.get('wsgi.run_once'):
      Local variables:
      Name	Value
      after 	[' except RequestDone:', ' pass', ' ...
      before 	[' req = Request(environ, start_response)', ' try:', ' try:', ...
      dispatcher 	<trac.web.main.RequestDispatcher object at 0x41536c2c>
      e 	<genshi.template.loader.TemplateNotFound instance at 0x4153aecc>
      env 	<trac.env.Environment object at 0x407d3dac>
      env_name 	'advent'
      env_parent_dir 	None
      env_path 	'/home/svn/tracprojects/advent'
      env_paths 	['/home/svn/tracprojects/yrcircd', '/home/svn/tracprojects/yrcfs2-client', ...
      environ 	{'trac.base_url': u'', ...
      exc_info 	(<class genshi.template.loader.TemplateNotFound at 0x4073414c>, ...
      filename 	'/usr/lib/python2.3/site-packages/trac/web/'
      frames 	[{'function': 'dispatch_request', 'lines_before': [' req = ...
      line 	' dispatcher.dispatch(req)'
      lineno 	386
      message 	u'TemplateNotFound: Template "admin_accountsconfig.html" not found'
      path_info 	['admin']
      req 	<Request "GET /admin">
      start_response 	<bound method WSGIServerGateway._start_response of ...
      tb 	<traceback object at 0x425a7874>
      traceback 	'Traceback (most recent call last):\n File ...
    * File "/usr/lib/python2.3/site-packages/trac/web/", line 220, in dispatch
      Code fragment:
       214. req.display(template, content_type or 'text/html')
       215. else: # Genshi
       216. # FIXME: postprocess API need to be adapted...
       217. template, data, content_type = resp
       218. output = chrome.render_template(req, template, data,
       219. content_type)
       220. # Give the session a chance to persist changes
       221. if req.session:
       223. req.send(output, content_type or 'text/html')
       224. else:
      Local variables:
      Name	Value
      chosen_handler 	<trac.admin.web_ui.AdminModule object at 0x4153a4ac>
      chrome 	< object at 0x411e2ccc>
      content_type 	None
      data 	{'active_cat': 'accounts', 'panels': [{'category': {'id': 'accounts', ...
      err 	(<class genshi.template.loader.TemplateNotFound at 0x4073414c>, ...
      handler 	<trac.admin.web_ui.AdminModule object at 0x4153a4ac>
      req 	<Request "GET /admin">
      resp 	('admin_accountsconfig.html', {'active_cat': 'accounts', 'panels': ...
      self 	<trac.web.main.RequestDispatcher object at 0x41536c2c>
      template 	'admin_accountsconfig.html'
    * File "/usr/lib/python2.3/site-packages/trac/web/", line 486, in render_template
      Code fragment:
       480. if content_type is None:
       481. content_type = 'text/html'
       482. method = {'text/html': 'xhtml',
       483. 'text/plain': 'text'}.get(content_type, 'xml')
       485. template = self.load_template(filename, method=method)
       486. data = self.populate_data(req, data)
       488. stream = template.generate(**data)
       489. if fragment:
       490. return stream
      Local variables:
      Name	Value
      content_type 	'text/html'
      data 	{'active_cat': 'accounts', 'panels': [{'category': {'id': 'accounts', ...
      filename 	'admin_accountsconfig.html'
      fragment 	False
      method 	'xhtml'
      req 	<Request "GET /admin">
      self 	< object at 0x411e2ccc>
    * File "/usr/lib/python2.3/site-packages/trac/web/", line 470, in load_template
      Code fragment:
       464. if method == 'text':
       465. cls = TextTemplate
       466. else:
       467. cls = MarkupTemplate
       469. return self.templates.load(filename, cls=cls)
       471. def render_template(self, req, filename, data, content_type=None,
       472. fragment=False):
       473. """Render the `filename` using the `data` for the context.
      Local variables:
      Name	Value
      cls 	<class 'genshi.template.markup.MarkupTemplate'>
      filename 	'admin_accountsconfig.html'
      method 	'xhtml'
      self 	< object at 0x411e2ccc>
    * File "build/bdist.linux-i686/egg/genshi/template/", line 182, in load 

Attachments (1)

accountmanager.11dev.patch (367 bytes) - added by trep@… 16 years ago.
simple patch, devs must have overlooked this

Download all attachments as: .zip

Change History (10)

comment:1 Changed 16 years ago by lazaridis_com

I had a similar problems, which was solved by simply enabling the full plugin, and disabling unwanted parts in seperate line:

acct_mgr.* = enabled 
acct_mgr.web_ui.RegistrationModule = disabled 


comment:2 Changed 16 years ago by trep@…

Trac Release: 0.100.11

this doesnt help the fact that it doesnt seem to be able to find the template files for the plugin inside the plugin .egg

Changed 16 years ago by trep@…

Attachment: accountmanager.11dev.patch added

simple patch, devs must have overlooked this

comment:3 Changed 16 years ago by anonymous

I met same problem. Have this patch not merged into trunk yet?

I copied templates dir manually....

comment:4 Changed 16 years ago by Matt Good

Resolution: fixed
Status: newclosed

(In [1665]) update package_data setting for the Genshi templates (fixes #899)

comment:5 Changed 15 years ago by sam@…

Resolution: fixed
Status: closedreopened

I still have this problem, fix 1665 appears to not have resolved the issue.

comment:6 Changed 15 years ago by sam@…

I fixed this. I'm not sure how to do a patch file, but the change is simple:

line 33 of was


it should be changed to

implements(IAdminPanelProvider, ITemplateProvider)

comment:7 Changed 15 years ago by Doug Harris

If I've installed the egg as per the instructions on the main page of the AccountManager plugin, what's the proper procedure to apply this patch?

Should I unzip all and edit the

comment:8 in reply to:  7 Changed 15 years ago by Doug Harris

Replying to dharris:

Should I unzip all and edit the

Answered my own question.... if the egg didn't install as a directory, do the same easy_install command but use -Z (capital Z) to force the files to be unzipped. Then edit the file.

comment:9 Changed 15 years ago by Matt Good

Resolution: fixed
Status: reopenedclosed

(In [2533]) forgot to make the admin module an ITemplateProvider (fixes #899)

Modify Ticket

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