Hi all,
I'm a newbie to zope3, but I've been looking through google, the zope3
apidoc, the books by weithershausen and richter and can't find the
solution to my problem.
I've added two items to the zmi_views menu. One is an browser:editform
(named AddProject.html), and the other is a browser:page (named
ViewProject.html).
If I don't add the menu="zmi_views" title="ViewIt" to the
ViewProject.html page directive in the configure.zcml file and visit
http://localhost:8090/testproject/ViewProject.html, the page displays
perfectly.
testproject is an instance of the finance.project.Project class.
Withouth the ViewProject.html page, the addForm and editForm work ok,
and all three work ok if I don't add the ViewProject.html to the
zmi_views menu
If I add the menu="zmi_views" title="ViewIt" to the browser:page
directive, I get an error when visiting the same page.
The error is a "ValueError: list.index(x): x not in list", which does
not mean much I guess. The full trace does not help me much more though
(it is listed below), it just tells me something goes wrong generating
the menu. But I don't get what goes wrong.
I guess it is just something simple, but I can't find what. Who can
help? My packages configure.zcml,browser/configure.zcml and
projectview.pt files are below the error trace.
Time
Tue Jul 11 20:28:02 2006
User
admin, zope.manager, Manager,
Request URL
http://localhost:8090/testproject/ViewProject.html
Exception type
ValueError
Exception value
list.index(x): x not in list
Traceback
Traceback (innermost last):
* Module zope.publisher.publish, line 138, in publish
result = publication.callObject(request, object)
* Module zope.app.publication.zopepublication, line 161, in callObject
return mapply(ob, request.getPositionalArguments(), request)
* Module zope.publisher.publish, line 113, in mapply
return debug_call(object, args)
__traceback_info__: zope.app.pagetemplate.simpleviewclass.SimpleViewClass from
/home/dolf/opt/zope/lib/python/finance/browser/projectview.pt instance
at 0xb5e5882c>
* Module zope.publisher.publish, line 119, in debug_call
return object(*args)
* Module zope.app.pagetemplate.simpleviewclass, line 44, in __call__
return self.index(*args, **kw)
* Module zope.app.pagetemplate.viewpagetemplatefile, line 83, in
__call__
return self.im_func(im_self, *args, **kw)
* Module zope.app.pagetemplate.viewpagetemplatefile, line 51, in
__call__
sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
* Module zope.pagetemplate.pagetemplate, line 117, in pt_render
strictinsert=0, sourceAnnotations=sourceAnnotations)()
* Module zope.tal.talinterpreter, line 277, in __call__
self.interpret(self.program)
* Module zope.tal.talinterpreter, line 352, in interpret
handlers[opcode](self, args)
* Module zope.tal.talinterpreter, line 908, in do_useMacro
self.interpret(macro)
* Module zope.tal.talinterpreter, line 352, in interpret
handlers[opcode](self, args)
* Module zope.tal.talinterpreter, line 538, in do_optTag_tal
self.do_optTag(stuff)
* Module zope.tal.talinterpreter, line 523, in do_optTag
return self.no_tag(start, program)
* Module zope.tal.talinterpreter, line 518, in no_tag
self.interpret(program)
* Module zope.tal.talinterpreter, line 352, in interpret
handlers[opcode](self, args)
* Module zope.tal.talinterpreter, line 878, in do_defineMacro
self.interpret(macro)
* Module zope.tal.talinterpreter, line 352, in interpret
handlers[opcode](self, args)
* Module zope.tal.talinterpreter, line 976, in do_defineSlot
self.interpret(block)
* Module zope.tal.talinterpreter, line 352, in interpret
handlers[opcode](self, args)
* Module zope.tal.talinterpreter, line 538, in do_optTag_tal
self.do_optTag(stuff)
* Module zope.tal.talinterpreter, line 523, in do_optTag
return self.no_tag(start, program)
* Module zope.tal.talinterpreter, line 518, in no_tag
self.interpret(program)
* Module zope.tal.talinterpreter, line 352, in interpret
handlers[opcode](self, args)
* Module zope.tal.talinterpreter, line 872, in do_condition
self.interpret(block)
* Module zope.tal.talinterpreter, line 352, in interpret
handlers[opcode](self, args)
* Module zope.tal.talinterpreter, line 839, in do_loop_tal
iterator = self.engine.setRepeat(name, expr)
* Module zope.tales.tales, line 682, in setRepeat
expr = self.evaluate(expr)
* Module zope.tales.tales, line 696, in evaluate
return expression(self)
/home/dolf/opt/zope/lib/python/zope/app/rotterdam/template_tablelayout.pt
Line 112, Column 24
Expression:
- Names:
{'args': (),
'context': ,
'default': ,
'loop': {},
'nothing': None,
'options': {},
're