Opened 18 years ago
Closed 17 years ago
#899 closed defect (fixed)
templates not found when plugin enabled
Reported by: | Owned by: | Matt Good | |
---|---|---|---|
Priority: | high | Component: | AccountManagerPlugin |
Severity: | major | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
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/main.py", line 387, in dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 220, in dispatch content_type) File "/usr/lib/python2.3/site-packages/trac/web/chrome.py", line 486, in render_template template = self.load_template(filename, method=method) File "/usr/lib/python2.3/site-packages/trac/web/chrome.py", line 470, in load_template return self.templates.load(filename, cls=cls) File "build/bdist.linux-i686/egg/genshi/template/loader.py", 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/main.py", 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'https://www.whyaresee.net/trac/advent', ... exc_info (<class genshi.template.loader.TemplateNotFound at 0x4073414c>, ... filename '/usr/lib/python2.3/site-packages/trac/web/main.py' 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/main.py", 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: 222. req.session.save() 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 <trac.web.chrome.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/chrome.py", 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') 484. 485. template = self.load_template(filename, method=method) 486. data = self.populate_data(req, data) 487. 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 <trac.web.chrome.Chrome object at 0x411e2ccc> * File "/usr/lib/python2.3/site-packages/trac/web/chrome.py", line 470, in load_template Code fragment: 464. if method == 'text': 465. cls = TextTemplate 466. else: 467. cls = MarkupTemplate 468. 469. return self.templates.load(filename, cls=cls) 470. 471. def render_template(self, req, filename, data, content_type=None, 472. fragment=False): 473. """Render the `filename` using the `data` for the context. 474. Local variables: Name Value cls <class 'genshi.template.markup.MarkupTemplate'> filename 'admin_accountsconfig.html' method 'xhtml' self <trac.web.chrome.Chrome object at 0x411e2ccc> * File "build/bdist.linux-i686/egg/genshi/template/loader.py", line 182, in load
Attachments (1)
Change History (10)
comment:1 Changed 18 years ago by
comment:2 Changed 18 years ago by
Trac Release: | 0.10 → 0.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 18 years ago by
Attachment: | accountmanager.11dev.patch added |
---|
simple patch, devs must have overlooked this
comment:3 Changed 18 years ago by
I met same problem. Have this patch not merged into trunk yet?
I copied templates dir manually....
comment:4 Changed 18 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:5 Changed 18 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I still have this problem, fix 1665 appears to not have resolved the issue.
comment:6 Changed 18 years ago by
I fixed this. I'm not sure how to do a patch file, but the change is simple:
line 33 of admin.py was
implements(IAdminPanelProvider)
it should be changed to
implements(IAdminPanelProvider, ITemplateProvider)
comment:7 follow-up: 8 Changed 18 years ago by
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 admin.py?
comment:8 Changed 18 years ago by
Replying to dharris:
Should I unzip all and edit the admin.py?
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 admin.py file.
comment:9 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
I had a similar problems, which was solved by simply enabling the full plugin, and disabling unwanted parts in seperate line:
source: http://dev.lazaridis.com/base/changeset/111