[Zope3-checkins] CVS: Zope3/src/zope/app/publisher/browser - viewmeta.py:1.8

Ulrich Eck ueck@net-labs.de
Mon, 03 Feb 2003 12:24:16 +0100


Hi Albertas,

> We were unable to reprpoduce the error on Zope3 with this patch with
> Python 2.2.2.  The tests pass and the Adding view works fine.
>
> Please make sure your sandbox is OK and provide more information.  A
> traceback would be nice.

last checking broke adding components TTW:
  * Module zope.publisher.publish, line 132, in publish
  * Module zope.app.publication.zopepublication, line 157, in callObject
  * Module zope.publisher.publish, line 113, in mapply
      __traceback_info__: <bound method +.action of
      <zope.app.publisher.browser.viewmeta.+ object at 0x89ebf2c>>
  * Module zope.app.browser.services.service, line 46, in action

TypeError super(type, obj): obj must be an instance or subtype of type


> My change was needed to make the local authentication services to
> work.  Otherwise the class generated for add.pt does not have a
> context which is needed to do the security checks using a local
> authentication service in the browserDefault method.
>
> Could you perchance write a unit test for the thing that I broke?

I use Python-2.2.2 on Linux for development and did a complete checkout
from CVS-HEAD to ensure that none of my development-projects has influence
on the errors i get.

How can I write a test that simulated TTW Adding of a Service ??

I digged around a bit and it seems, that in
browser.services.service.ComponentAdding.action
the line:

return super(ComponentAdding, self).action(type_name, id)

complains that it needs an instance or subtype of type of
ComponentAdding->ContentAdding->BrowserView but it seems
that the "+" view has some different baseclasses:
it shows up as "zope.app.publisher.browser.viewmeta.+" class.
"+" isn't a valid classname .. it seems to come from zcml.

i don't know how to make things work with your changes ..
so i reverted them, because there was no way to add components
anymore.

how can we go on??


Ulrich Eck
------------------------------------------------------------------------
net-labs Systemhaus GmbH
Ebersberger Str. 46
85570 Markt Schwaben
fon:   +49-8121-4747-11
fax:   +49-8121-4747-77
email: ueck at net-labs.de
http://www.net-labs.de