[Zope] Guestbook

Andy Smith andy@ictibroker.com
Thu, 11 Mar 1999 20:10:32 -0500


> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of David
> Ascher
> Sent: Thursday, March 11, 1999 2:56 PM
> To: The Zope Group
> Subject: [Zope] Guestbook
>
>
> The guestbook product is broken in 1.10.2. I've 'fixed' it by removing
> both references to OFS.DocumentHandler (import and class inheritance).
> Now it's not broken, but it doesn't seem to work! Anytime I enter any
> data, it says 'data entered' but nothing ever shows up in the data view.
> Has anyone fixed this?
>
> BTW, I couldn't find an author name listed anywhere.
>

I'm the guilty party (!)

I found this problem before but so far haven't found the fix.... here's what
I originally posted to the list.

I'd like to get this sorted out as I'm also working on a Souped (Zoped?) up
version of Amos's poll product, which produces pie-chart gifs in response to
the poll results, but it also broke in much the same manner going from 1.9
to 1.10. So any help on this matter would be much appreciated!

Cheers,

Andy.

==============================================================

-----Original Message-----
From: Andy Smith [mailto:andy.smith@iname.com]
Sent: Friday, February 19, 1999 2:29 PM
To: Phil Harris; zope@zope.org
Subject: RE: [Zope] Guestbook Product


I get the same thing :(

Hmm.. looks like DocumentHandler no longer exists.

I've taken out DocumentHandler from the Guestbook, to mimick the change that
has been made to 'Folder' going from 1.9->1.10. When doing the guestbook, I
kept making sideways glances to Folder.py to see how it was done ;)

The book no longer crashes but I'm getting some other wierdness. The
guestbook is a folderish product which contains two documents that the user
can add to change the appearance of the guestbook. They're added by the
following lines in the 'add' method ...

        # Add a Document used to view previous entries
        fileName = os.path.join(prefix,'index.dtml')
        index2 = open(fileName,'r').read()
        i = DTMLMethod(index2,__name__='index_html')
        print "i is %s" % i.meta_type
        i.title='Change me to determine how entries are viewed'
        self._setObject('index_html',i)
        print "ObjectItems is %s" % list(self.objectItems())

The added objects no longer seem to be showing up in objectItems().

The debug statement, when run on 1.9 prints out the newly added object in
the call to 'objectItems()', while on 1.10 it returns an empty list. Is this
a side-effect of the removal of DocumentHandler? I thought that _setObject
was being inherited from ObjectManager, so wouldn't be affected by the
removal of DocumentHandler.

Cheers,

Andy.


> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Phil
> Harris
> Sent: Friday, February 19, 1999 8:46 AM
> To: zope@zope.org
> Subject: [Zope] Guestbook Product
>
>
> Has anyone else noticed that the GuestBook Product no longer
> works in 1.10?
>
> Is it just me or what?
>
> I get a traceback of
>
> Traceback (innermost last):
>   File "/usr/local/Zope-1.10.0pr1-src/lib/python/OFS/Application.py", line
> 393, in import_products
>     product=__import__(pname, global_dict, global_dict, silly)
>   File
> "/usr/local/Zope-1.10.0pr1-src/lib/python/Products/GuestBook/__init__.py",
> line 7, in ?
>     import GuestBook
>   File
> "/usr/local/Zope-1.10.0pr1-src/lib/python/Products/GuestBook/Guest
> Book.py",
> line 7, in ?
>     from OFS.Document import DocumentHandler, Document
> ImportError: cannot import name DocumentHandler
>
> Any Ideas?
>
> Phil
>