[Zope] TypeError, Unsliceable object from standard product add

complaw@hal-pc.org complaw@hal-pc.org
Fri, 9 Nov 2001 18:06:26 GMT


This is a multi-part message in MIME format.

--MailMan_Boundary
Content-Type: text/plain

The attached file contains the error message that occurred when I tried to add
an object.  The object itself is defined in a custom product.  However, that
ZClass itself was made with the standard tools in Zope 2-3-1 (an oldie, but a
goodie).  I caughed up when I was trying to create the object.  The add DTML is
below (unadultered after it was created by the wizard):

<HTML>
<HEAD><TITLE>Add sw_patent_property</TITLE></HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">

<dtml-comment> We add the new object by calling the class in
                a with tag.  Not only does this get the thing
                added, it adds the new thing's attributes to
                the DTML name space, so we can call methods
                to initialize the object.
</dtml-comment>

<dtml-with "sw_patent_property.createInObjectManager(REQUEST['id'], REQUEST)">

  <dtml-comment>

     You can add code that modifies the new instance here.

     For example, if you have a property sheet that you want to update
     from form values, you can call it here:

       <dtml-call "propertysheets.Basic.manage_editProperties(
                  REQUEST)">

  </dtml-comment>

</dtml-with>

<dtml-comment> Now we need to return something.  We do this via
                a redirect so that the URL is correct.

                Unfortunately, the way we do this depends on
                whether we live in a product or in a class.
                If we live in a product, we need to use DestinationURL
                to decide where to go. If we live in a class,
                DestinationURL won't be available, so we use URL2.
</dtml-comment>
<dtml-if DestinationURL>

 <dtml-call "RESPONSE.redirect(
       DestinationURL+'/manage_workspace')">

<dtml-else>

    <dtml-call "RESPONSE.redirect(
           URL2+'/manage_workspace')">
</dtml-if>
</body></html>


Any idea what the problem could be?  I'm surprised to get this error as the only
thing that I did was create a ZClass and then try to instantiate an object.

Thanks in advance for any hints or advice.

Ron
--MailMan_Boundary
Content-Type: text/html; name="error.html"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="error.html"

PGh0bWw+CjxoZWFkPgogIDx0aXRsZT5zd19wYXRlbnRfcHJvcGVydHkgZmFjdG9yeTwvdGl0bGU+
CjwvaGVhZD4KPGJvZHkgYmdjb2xvcj0i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