This is a pair of external methods that will repair a broken ZClass registry.
After a Zope upgrade it is possible for the global ZClass registry to become corrupt. The primary symptom is a "could not load oid" error when you try to create a new ZClass. You can also use this utility to prune ZClasses that are broken because of missing base classes, etc.
Add the downloadable Python file to your "Extensions" directory then create a folder in Zope with two methods.
External method 1:
Id: isGlobalRegistryCorrupt Function name: isGlobalRegistryCorrupt Module: cleanGlobals
External method 2:
Id: cleanGlobals Function name: cleanGlobals Module: cleanGlobals
Execute the first (by selecting the "try it" tab) to check whether your global registry is corrupt. If it is, you should definitely run the second external method. If it is not, you may or may not want to run the utility anyway--if you think there might be a ZODB problem with your ZClasses then it may fix it. Remember that you can use Zope's undo feature.