[Zope] Default ZClass constructor not working? (was: re: Zope .org feedba ck)

Leeuw van der, Tim tim.leeuwvander@nl.unisys.com
Sun, 12 Jan 2003 02:14:55 -0600


Hi,

I was following the 'Howto build a simple ZClass' howto. I didn't change
anything with permissions.

When this constructor didn't work, I copied and pasted a Python Script
constructor from the HOWTO, which is appearantly what Zope 2.6 generates. I
renamed the original constructor, created a new Python Script the
constructor name, and copied the script from the webpage.

That worked, without changing any permissions, and created for me the new
ZClass instance. It even created the new ZCatalog instance inside, as it was
supposed to.
So the constructor code was definately executed, no errors, no permissions
changed for anything.

Does that help, or does that make it a bigger problem?

Regards,

--Tim

-----Original Message-----
From: Dieter Maurer [mailto:dieter@handshake.de]
Sent: zaterdag 11 januari 2003 19:52
To: Leeuw van der, Tim
Cc: kedai@kedai.com.my; zope@zope.org
Subject: Re: [Zope] Default ZClass constructor not working? (was: re:
Zope.org feedba ck)


Leeuw van der, Tim wrote at 2003-1-10 16:04 -0600:
 > Still leaves me with the default DTML Constructor Method for a ZClass not
 > working. The traceback is:
 > ...
 > NameError
 > ...
 > line 61, in render
 >     (Object: tbEntry.createInObjectManager(REQUEST['id'], REQUEST))
 >   File C:\Program Files\ZopeSite\lib\python\DocumentTemplate\DT_Util.py,
 > line 159, in eval
 >     (Object: tbEntry.createInObjectManager(REQUEST['id'], REQUEST))
 >     (Info: REQUEST)
 >   File <string>, line 2, in f
 > NameError: global name 'tbEntry' is not defined
Are you sure, the user has the right to create "tbEntry" instances.

   Zope sometimes converts "Unauthorized" into "KeyError"s (I
   am astonished that you get a "NameError").

   Check the "Permission" tab of your ZClass.
   It "Create instances" mapped correctly?


Dieter