<div>I am trying to create simple content type with zope 2.10.4 and five. I have performed the following:</div> <div> </div> <div> - created a content interface </div> <div> - created a content type class implementing the interface and extending both Persistent and SimpleItem</div> <div> - created zcml class entries for the content type</div> <div> - created zcml browser entries for 'addform' and 'editform'</div> <div> </div> <div>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).</div> <div> </div> <div>The error looks like it is missing a 'main_template' object. Any ideas what might be wrong?</div> <div> </div> <div> </div> <div> </div> <div>ERROR MESSAGE:</div> <div> </div> <div>2007-11-07
12:31:01 ERROR Zope.SiteErrorLog <A href="http://localhost:8080/+/Password_add">http://localhost:8080/+/Password_add</A></div> <div>Traceback (innermost last):<BR> Module ZPublisher.Publish, line 119, in publish<BR> Module ZPublisher.mapply, line 88, in mapply<BR> Module ZPublisher.Publish, line 42, in call_object<BR> Module Products.Five.browser.metaconfigure, line 417, in __call__<BR> Module Shared.DC.Scripts.Bindings, line 313, in __call__<BR> Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec<BR> Module Products.PageTemplates.PageTemplateFile, line 129, in _exec<BR> Module Products.PageTemplates.PageTemplate, line 89, in pt_render<BR> Module zope.pagetemplate.pagetemplate, line 117, in pt_render<BR> - Warning: Macro expansion failed<BR> - Warning: exceptions.KeyError: 'main_template'<BR> Module zope.tal.talinterpreter, line 271, in __call__<BR> Module
zope.tal.talinterpreter, line 346, in interpret<BR> Module zope.tal.talinterpreter, line 891, in do_useMacro<BR> Module zope.tal.talinterpreter, line 346, in interpret<BR> Module zope.tal.talinterpreter, line 536, in do_optTag_tal<BR> Module zope.tal.talinterpreter, line 521, in do_optTag<BR> Module zope.tal.talinterpreter, line 516, in no_tag<BR> Module zope.tal.talinterpreter, line 346, in interpret<BR> Module zope.tal.talinterpreter, line 870, in do_useMacro<BR> Module zope.tales.tales, line 696, in evaluate<BR> - URL: index<BR> - Line 2, Column 1<BR> - Expression: <PathExpr standard:'context/main_template/macros/master'><BR> - Names:<BR> {'container': <+ at />,<BR> 'context': <+ at />,<BR> 'default': <object object at
0x0099F528>,<BR> 'here': <+ at />,<BR> 'loop': {},<BR> 'nothing': None,<BR> 'options': {'args': (<Products.Five.metaclass.SimpleViewClass from add.pt<BR> object at 0x05D4C710>,)},<BR> 'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x05D<BR>49D78>,<BR> 'request': <HTTPRequest, URL=http://localhost:8080/+/Password_add>,<BR> 'root': <Application at >,<BR> 'template': <ImplicitAcquirerWrapper object at 0x05D4CDB0>,<BR> 'traverse_subpath': [],<BR> 'user': <User 'admin'>,<BR> 'view':
<Products.Five.metaclass.SimpleViewClass from add.pt object at 0x<BR>05D4C710>,<BR> 'views': <zope.app.pagetemplate.viewpagetemplatefile.ViewMapper object at<BR> 0x05D4CD50>}<BR> Module zope.tales.expressions, line 217, in __call__<BR> Module Products.PageTemplates.Expressions, line 153, in _eval<BR> Module zope.tales.expressions, line 124, in _eval<BR> Module Products.PageTemplates.Expressions, line 100, in trustedBoboAwareZopeTr<BR>averse<BR> Module OFS.Traversable, line 284, in unrestrictedTraverse<BR> - __traceback_info__: ([], 'main_template')<BR>KeyError: 'main_template'</div>