[Zope] Zoo guestbook example.

Ignacio Valdes ivaldes@hal-pc.org
Mon, 12 Feb 2001 12:52:43 -0600


Good. Tried it, now I get this message:

Zope Error

             Zope has encountered an error while publishing this resource.

             Error Type: AttributeError
             Error Value: 'string' object has no attribute 'objectIds'



             Troubleshooting Suggestions

                  The URL may be incorrect.
                  The parameters passed to this resource may be incorrect.
                  A resource that this resource relies on may be encountering
an error.

             For more detailed information about the error, please refer to
the HTML source for this page.

             If the error persists please contact the site maintainer. Thank
you for your patience.


Traceback (innermost last):
  File /home/zope/zope4/lib/python/ZPublisher/Publish.py, line 222, in
publish_module
  File /home/zope/zope4/lib/python/ZPublisher/Publish.py, line 187, in publish

  File /home/zope/zope4/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
    (Object: Traversable)
  File /home/zope/zope4/lib/python/ZPublisher/Publish.py, line 171, in publish

  File /home/zope/zope4/lib/python/ZPublisher/mapply.py, line 160, in mapply
    (Object: addEntryAction)
  File /home/zope/zope4/lib/python/ZPublisher/Publish.py, line 112, in
call_object
    (Object: addEntryAction)
  File /home/zope/zope4/lib/python/OFS/DTMLMethod.py, line 172, in __call__
    (Object: addEntryAction)
  File /home/zope/zope4/lib/python/DocumentTemplate/DT_String.py, line 528, in
__call__
    (Object: addEntryAction)
  File /home/zope/zope4/lib/python/DocumentTemplate/DT_Util.py, line 337, in
eval
    (Object: addEntry(guest_name, comments))
    (Info: guest_name)
  File <string>, line 0, in ?
  File /home/zope/zope4/lib/python/Products/PythonMethod/PythonMethod.py, line
168, in __call__
    (Object: addEntry)
    (Info: (('Anonymous', 'test'), {}, None))
  File <string>, line 2, in addEntry
AttributeError: (see above)

With this code, with guest_name and self as parameters.

id='entry_%d' % len(self.objectIds())
self.manage_addDTMLDocument(id, title="", file=comments)
doc=getattr(self, id)
doc.manage_addProperty('guest_name', guest_name, 'string')

-- IV