I'm trying to use auto-generated add forms in Zope 2.10-6 (Ubuntu) with 
Five but I'm having some trouble getting them to work. I've added the 
section below to my configure.zcml:

<snip configure.zcml>

       label="Add Demo View"


But when I try to open the page I get the following error:

2009-01-22T02:01:12 ERROR Zope.SiteErrorLog
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 zope.formlib.form, line 770, in __call__
   Module zope.formlib.form, line 885, in render
   Module zope.formlib.form, line 764, in render
   Module plone.app.form._named, line 26, 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 870, in do_useMacro
   Module zope.tales.tales, line 696, in evaluate
    - URL: addingpageform
    - Line 1, Column 0
    - Expression: <PathExpr standard:'context/main_template/macros/master'>
    - Names:
       {'container': <+ at />,
        'context': <+ at />,
        'default': <object object at 0xb7e7f538>,
        'here': <+ at />,
        'loop': {},
        'nothing': None,
        'options': {'args': ()},
        'repeat': <Products.PageTemplates.Expressions.SafeMapping object 
at 0xefeebcc>,
        'request': <HTTPRequest, 
        'root': <Application at >,
        'template': <ImplicitAcquirerWrapper object at 0xefeeb4c>,
        'traverse_subpath': [],
        'user': <PropertiedUser 'admin'>,
        'view': <Products.Five.metaclass.DemoContentAddForm object at 
        'views': <zope.app.pagetemplate.viewpagetemplatefile.ViewMapper 
object at 0xefeeb6c>}
   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 
   Module OFS.Traversable, line 284, in unrestrictedTraverse
    - __traceback_info__: ([], 'main_template')
KeyError: 'main_template'

I've Googled about for an answer but the only reference I can find is this:


which didn't have a reply (not one that I could find anyway)

Does anyone have any ideas about what I am doing wrong, or how else I 
can get auto-generated add forms working for a Five product?


Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to