nope, wasn't that :)

I'm actually following the example from chapter 3 of Zope: Web Application Development and Content Management.
the annoying thing is that I've tried it three times now, triple++ checked everything. and it's worked once, and failed twice.


zope wrote:
i don't know if this will fix it, but you might try naming the product CalendarEvent and the class calendarEvent, so there is a distinct namespace between them.
m
-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Ben Avery
Sent: Friday, July 05, 2002 9:07 AM
To: zope@zope.org
Subject: [Zope] simple z-class problem

Hi,

I'm having intermittent problems with the simplest z-class within a new product, through the ZMI.
I'm going through the stages of

1) I create a new product, CalendarEvent.
2) inside Test, I create a z-class, id: CalendarEvent.
3) inside this, I add some property sheet with some properties through the properties tab.
4) finally, I change the default view to propertysheets/Prop/manage from the dropdown list.

Now when I try to create an instance of it in a development folder, I get the constructor form, but then a NameError:
Error Type: NameError
Error Value: global name 'CalendarEvent' is not defined
trace below:
Traceback (innermost last):
  File /export/home/Zope-2.5.1/lib/python/ZPublisher/Publish.py, line 150, in publish_module
  File /export/home/Zope-2.5.1/lib/python/ZPublisher/Publish.py, line 114, in publish
  File /export/home/Zope-2.5.1/lib/python/Zope/__init__.py, line 159, in zpublisher_exception_hook
    (Object: CalendarEvent_factory)
  File /export/home/Zope-2.5.1/lib/python/ZPublisher/Publish.py, line 98, in publish
  File /export/home/Zope-2.5.1/lib/python/ZPublisher/mapply.py, line 88, in mapply
    (Object: CalendarEvent_add)
  File /export/home/Zope-2.5.1/lib/python/ZPublisher/Publish.py, line 39, in call_object
    (Object: CalendarEvent_add)
  File /export/home/Zope-2.5.1/lib/python/OFS/DTMLMethod.py, line 127, in __call__
    (Object: CalendarEvent_add)
  File /export/home/Zope-2.5.1/lib/python/DocumentTemplate/DT_String.py, line 473, in __call__
    (Object: CalendarEvent_add)
  File /export/home/Zope-2.5.1/lib/python/DocumentTemplate/DT_With.py, line 61, in render
    (Object: CalendarEvent.createInObjectManager(REQUEST['id'], REQUEST))
  File /export/home/Zope-2.5.1/lib/python/DocumentTemplate/DT_Util.py, line 159, in eval
    (Object: CalendarEvent.createInObjectManager(REQUEST['id'], REQUEST))
    (Info: REQUEST)
  File <string>, line 2, in f
NameError: (see above)

    
I have done this exact procedure before, with success. Now it doesn't work. I've rebooted the zope server.
I'm using Zope 2.5.1, Python 2.1.3 on Solaris 2.7.

Has anyone else seen this, or can anyone tell me what I'm doing wrong?