[Zope3-Users] z3c.form and subforms in an AddForm?

Matt Bowen mrbowen at gmail.com
Thu Jul 5 21:14:09 EDT 2007


Stephan and Hermann,

Thank you both so much for all of your help; I can now display my object --
it turned out that my z3c.form had not put its configs in my
package-includes, so Stephan's #3 made my display work. Of course, I also
fixed some other things that you both suggested, so I know I had other
problems. Unfortunately, when I try to use either add or edit, I get the
following now:

for edit.html I get

127.0.0.1 - - [05/Jul/2007:21:03:22 -0400] "GET
/++skin++MovingTargetBrowser/viewguy/edit.html HTTP/1.1" 500 201 "-"
"Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.4) Gecko/20070515
Firefox/2.0.0.4"
exceptions.RuntimeError:
maximum recursion depth exceeded
> /opt/zope/zope-3.4.0a1
/lib/python/zope/tal/talinterpreter.py(379)do_startEndTag()
-> self.do_startTag(stuff, self.endsep, self.endlen)

I pasted the full trackback for edit here: http://paste.plone.org/15590

For addNextAction.html, I get

127.0.0.1 - - [05/Jul/2007:21:04:37 -0400] "GET
/++skin++MovingTargetBrowser/viewguy/edit.html HTTP/1.1" 500 201 "-"
"Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.4) Gecko/20070515
Firefox/2.0.0.4"
exceptions.RuntimeError:
maximum recursion depth exceeded
> /opt/zope/zope-3.4.0a1
/lib/python/zope/tal/talinterpreter.py(226)StringIO()
-> return FasterStringIO()

I pasted the full traceback for add here: http://paste.plone.org/15589

The tracebacks are 1600+ lines long, so I'm having a little trouble working
my way through them to decipher my error, so if anyone has any idea what
I've done wrong or has seen anything similar, I'd be grateful to hear.

Thank you all for all the help you've already given.

Best,
Matt

On 7/4/07, Stephan Richter <srichter at cosmos.phy.tufts.edu> wrote:
>
> On Wednesday 04 July 2007 12:59, Matt Bowen wrote:
> >   File "/opt/zope/python2.4/lib/python2.4/site-packages/z3c.form-
> > 1.3.0-py2.4.egg/z3c/form/form.py", line 144, in __call__
> >     self.update()
> >   File "/opt/zope/python2.4/lib/python2.4/site-packages/z3c.form-
> > 1.3.0-py2.4.egg/z3c/form/form.py", line 139, in update
> >     super(Form, self).update()
> >   File "/opt/zope/python2.4/lib/python2.4/site-packages/z3c.form-
> > 1.3.0-py2.4.egg/z3c/form/form.py", line 88, in update
> >     self.updateWidgets()
> >   File "/opt/zope/python2.4/lib/python2.4/site-packages/z3c.form-
> > 1.3.0-py2.4.egg/z3c/form/form.py", line 167, in updateWidgets
> >     self.widgets = zope.component.getMultiAdapter(
> >   File "/opt/zope/zope-3.4.0a1/lib/python/zope/component/_api.py", line
> > 103, in getMultiAdapter
> >     raise ComponentLookupError(objects, interface, name)
> > zope.component.interfaces.ComponentLookupError: ((<
> > z3c.pagelet.zcml.NextActionAddForm object at 0x2b69896b4850>, <
> > zope.publisher.browser.BrowserRequest instance URL=
> > http://localhost:9080/++skin++MovingTargetBrowser/addNextAction.html>, <
> > zope.app.folder.folder.Folder object at 0x2b69896eb0c8>),
> <InterfaceClass
> > z3c.form.interfaces.IWidgets>, u'')
>
> This error tells you that the "widget manager" (implementing ``IWidgets``)
> cannot be found for your (form, request, context) discriminator. This can
> really just mean one of the following three things:
>
> 1. Your skin "MovingTargetBrowser" does *not* inherit from the
> ``IFormLayer``
> skin. Can you show us your skin definition in Python and the registration
> in
> ZCML?
>
> 2. Your form does not provide ``IFieldsForm``. What does the following
> return?
>
>   >>> from z3c.form import interfaces
>   >>> interfaces.IFieldsForm.providedBy(form)
>
>   Can you paste your form Python code and the registration?
>
> 3. You did not hook up the ZCML files of z3c.form? Are you sure
> z3c/form/configure.zcml is loaded? This can be checked by causing a syntax
> error in that file and see whether the startup also breaks.
>
> > I keep reading over the .txt files in z3c.form, and I feel like I may be
> > missing some line. Do I need a datamanager? My schema is pretty
> > straightforward:
>
> No, the data manager and everything else is defined for the common case
> you
> are having.
>
> Regards,
> Stephan
> --
> Stephan Richter
> CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
> Web2k - Web Software Design, Development and Training
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope3-users/attachments/20070705/c5031dec/attachment.htm


More information about the Zope3-users mailing list