[Zope-dev] Using DTMLDocument as Base ZClass is a bug.

Jason Spisak jason@mtear.com
Wed, 15 Sep 1999 09:43:00 GMT


Thanks Kevin,

That didn't do it either.  I really shouldn't have to be changing the name
at all just to get the 'id' property to stick.  Can you, or anybody
recreate this? Just make any new ZClass based on DTMLDocument or Method,
and add apropertysheet of your own with an extra property.  Then try to
create an instance of it and get it's id through var, or the tree tag.

The traceback on the operation not permitted is this:


  The item <EM>Resume</EM> does not support this operation.
<!--
Traceback (innermost last):
  File /Zope/lib/python/ZPublisher/Publish.py, line 214, in publish_module
  File /Zope/lib/python/ZPublisher/Publish.py, line 179, in publish
  File /Zope/lib/python/Zope/__init__.py, line 201, in
zpublisher_exception_hook
    (Object: RoleManager)
  File /Zope/lib/python/ZPublisher/Publish.py, line 165, in publish
  File /Zope/lib/python/ZPublisher/mapply.py, line 160, in mapply
    (Object: ResumeClass_add)
  File /Zope/lib/python/ZPublisher/Publish.py, line 102, in call_object
    (Object: ResumeClass_add)
  File /Zope/lib/python/OFS/DTMLMethod.py, line 145, in __call__
    (Object: ResumeClass_add)
  File /Zope/lib/python/DocumentTemplate/DT_String.py, line 502, in
__call__
    (Object: ResumeClass_add)
  File /Zope/lib/python/DocumentTemplate/DT_With.py, line 148, in render
    (Object: ResumeClass.createInObjectManager('Resume', REQUEST))
  File /Zope/lib/python/DocumentTemplate/DT_Util.py, line 321, in eval
    (Object:
manage_renameObject('Resume',_.str(PARENTS[0].counter),REQUEST))
  File &lt;string&gt;, line 0, in ?
  File /Zope/lib/python/OFS/CopySupport.py, line 252, in
manage_renameObject
    (Object: CatalogAware)
Copy Error: (see above)

-->
> >I can create instances of a ZClass base on DTMLDocument fom python and
> >they are fine.  But when using the management interface, their 'id' gets
> >entered as '<string>'.  Also when trying to use:
> >
> ><!--#call "manage_renameObject('old_name','new_name')"-->
> >
> >Zope tells me that 'old_name' doesn't suport this kind of operation.
> 
> I don't know if it will help, but have you tried:
> <dtml-call "manage_renameObject('old_name', 'new_name', REQUEST)">
> ??
> 
> REQUEST is sometimes needed for checking permissions...
> 
> Kevin
> 
> 

All my best,

Jason Spisak