[Zope] five zcml addview question
David Davis
davisd50 at yahoo.com
Wed Nov 7 12:37:53 EST 2007
I am trying to create simple content type with zope 2.10.4 and five. I have performed the following:
- created a content interface
- created a content type class implementing the interface and extending both Persistent and SimpleItem
- created zcml class entries for the content type
- created zcml browser entries for 'addform' and 'editform'
I am trying to get Zope to automatically create the forms based on the content schema. Once these steps were completed, I found my content type in the ZMI add menu. However, once I selected my content type, I got an error (see below).
The error looks like it is missing a 'main_template' object. Any ideas what might be wrong?
ERROR MESSAGE:
2007-11-07 12:31:01 ERROR Zope.SiteErrorLog http://localhost:8080/+/Password_add
Traceback (innermost last):
Module ZPublisher.Publish, line 119, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 42, in call_object
Module Products.Five.browser.metaconfigure, line 417, in __call__
Module Shared.DC.Scripts.Bindings, line 313, in __call__
Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
Module Products.PageTemplates.PageTemplateFile, line 129, in _exec
Module Products.PageTemplates.PageTemplate, line 89, in pt_render
Module zope.pagetemplate.pagetemplate, line 117, in pt_render
- Warning: Macro expansion failed
- Warning: exceptions.KeyError: 'main_template'
Module zope.tal.talinterpreter, line 271, in __call__
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 891, in do_useMacro
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 536, in do_optTag_tal
Module zope.tal.talinterpreter, line 521, in do_optTag
Module zope.tal.talinterpreter, line 516, in no_tag
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 870, in do_useMacro
Module zope.tales.tales, line 696, in evaluate
- URL: index
- Line 2, Column 1
- Expression: <PathExpr standard:'context/main_template/macros/master'>
- Names:
{'container': <+ at />,
'context': <+ at />,
'default': <object object at 0x0099F528>,
'here': <+ at />,
'loop': {},
'nothing': None,
'options': {'args': (<Products.Five.metaclass.SimpleViewClass from add.pt
object at 0x05D4C710>,)},
'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x05D
49D78>,
'request': <HTTPRequest, URL=http://localhost:8080/+/Password_add>,
'root': <Application at >,
'template': <ImplicitAcquirerWrapper object at 0x05D4CDB0>,
'traverse_subpath': [],
'user': <User 'admin'>,
'view': <Products.Five.metaclass.SimpleViewClass from add.pt object at 0x
05D4C710>,
'views': <zope.app.pagetemplate.viewpagetemplatefile.ViewMapper object at
0x05D4CD50>}
Module zope.tales.expressions, line 217, in __call__
Module Products.PageTemplates.Expressions, line 153, in _eval
Module zope.tales.expressions, line 124, in _eval
Module Products.PageTemplates.Expressions, line 100, in trustedBoboAwareZopeTr
averse
Module OFS.Traversable, line 284, in unrestrictedTraverse
- __traceback_info__: ([], 'main_template')
KeyError: 'main_template'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20071107/91ccb8f3/attachment.htm
More information about the Zope
mailing list