[Zope] Deleting ZClasses

Ben Ocean zope@thewebsons.com
Fri, 16 Nov 2001 15:24:43 -0800


At 06:04 PM 11/16/01 -0500, you wrote:
> > >, which should make it
> > >dissapear in your product selection menu.
> > They don't appear in the *Select type to add...* pull-down, if
> > that's what
> > you mean.
>Yes again.  This is where a valid zClass should appear, so we might be
>talking something other than a zClass.  Maybe a sub-class??  or you have a
>mangled zClass.

Wait a minute... My mistake, they *do* appear there.

> > >But all the old instances will exist.  Delete them manually. OR Globaly,
> > >search on the meta-type and delete.
> > How should I do this? I have root access.
>If you have many then you need to write a script.

About 4

>Otherwise just delete
>them like you would anything in the ZMI.

They do not appear in the ZMI.

>Actually I havent had to do major clean-ups yet in Zope.
>But my guess is you need to use TransparentFolders to look into all your
>sub-folders from the root, to locate all the instances of your zClass by
>searching for the meta-type.  something like
>productValues('zclass-meta-type-name-here')
>You will have to delete programmatically.

I don't follow what you mean here.

>OR use the FIND tab.

Something REALLY STRANGE keeps popping its head up, and it does so with the 
FIND tab. I have not a clue what PTKDemo is (although I think once upon a 
time I must have installed it...

Error Type: ImportError
Error Value: No module named PTKDemo

Traceback (innermost last):
   File 
/apache/ZopeInstallation/Zope_software_home/lib/python/ZPublisher/Publish.py, 
line 223, in publish_module
   File 
/apache/ZopeInstallation/Zope_software_home/lib/python/ZPublisher/Publish.py, 
line 187, in publish
   File 
/apache/ZopeInstallation/Zope_software_home/lib/python/Zope/__init__.py, 
line 226, in zpublisher_exception_hook
     (Object: Products)
   File 
/apache/ZopeInstallation/Zope_software_home/lib/python/ZPublisher/Publish.py, 
line 171, in publish
   File 
/apache/ZopeInstallation/Zope_software_home/lib/python/ZPublisher/mapply.py, 
line 160, in mapply
     (Object: manage_findResult)
   File 
/apache/ZopeInstallation/Zope_software_home/lib/python/ZPublisher/Publish.py, 
line 112, in call_object
     (Object: manage_findResult)
   File 
/apache/ZopeInstallation/Zope_software_home/lib/python/Shared/DC/Scripts/Bindings.py, 
line 324, in __call__
     (Object: manage_findResult)
   File 
/apache/ZopeInstallation/Zope_software_home/lib/python/Shared/DC/Scripts/Bindings.py, 
line 354, in _bindAndExec
     (Object: manage_findResult)
   File 
/apache/ZopeInstallation/Zope_software_home/lib/python/App/special_dtml.py, 
line 244, in _exec
     (Object: manage_findResult)
   File 
/apache/ZopeInstallation/Zope_software_home/lib/python/DocumentTemplate/DT_With.py, 
line 133, in render
     (Object: _.namespace(
     results=PrincipiaFind(this(),
         obj_ids=obj_ids,
         obj_metatypes=obj_metatypes,
         obj_searchterm=obj_searchterm,
         obj_expr=obj_expr,
         obj_mtime=obj_mtime,
         obj_mspec=obj_mspec,
         obj_permission=obj_permission,
         obj_roles=obj_roles,
         search_sub=search_sub,
         REQUEST=REQUEST)))
   File 
/apache/ZopeInstallation/Zope_software_home/lib/python/DocumentTemplate/DT_Util.py, 
line 231, in eval
     (Object: _.namespace(
     results=PrincipiaFind(this(),
         obj_ids=obj_ids,
         obj_metatypes=obj_metatypes,
         obj_searchterm=obj_searchterm,
         obj_expr=obj_expr,
         obj_mtime=obj_mtime,
         obj_mspec=obj_mspec,
         obj_permission=obj_permission,
         obj_roles=obj_roles,
         search_sub=search_sub,
         REQUEST=REQUEST)))
     (Info: obj_metatypes)
   File <string>, line 0, in ?
   File 
/apache/ZopeInstallation/Zope_software_home/lib/python/OFS/FindSupport.py, 
line 216, in ZopeFind
     (Object: Products)
   File 
/apache/ZopeInstallation/Zope_software_home/lib/python/OFS/FindSupport.py, 
line 181, in ZopeFind
     (Object: Products)
   File 
/apache/ZopeInstallation/Zope_software_home/lib/python/ZODB/Connection.py, 
line 544, in setstate
ImportError: (see above)


Thanks for any ideas you may have.
BenO