ghosts of removed products haunting ZSQL Methods?
I used to have the Product TrackerBase installed and have removed it. Now, however, attempts to access the "Advanced" tab of ZSQL Methods is broken because a chain of events attempt to get info about a the non-existent Product: lib/python/Shared/DC/ZRDB/dtml/advanced.dtml calls manage_product_zclass_info ../ZRDB/DA.py.manage_product_zclass_info (line 546) calls self.aq_acquire('_getProductRegistryData')('zclasses') One of these items is the dict: "{'id': 'Tracker', 'meta_type': 'Tracker', 'product': 'Tracker', 'meta_class': <ZClass instance at d55af0>} Then, line 548 calls "if hasattr(z._zclass_,'_p_deactivate')". The attempt to access z._zclass_ fails because this product doesn't exist. 1) the call to z._zclass_ doesn't actuallt do anything except: ## Eek, persistent 2) Is this schizophrenic state my fault? 3) How to rectify the problem (Make *all* of Zope know that TrackerBase is gone)? Thanks in advance, traceback follows, Ziniti Error Type: ImportError Error Value: No module named TrackerBase Troubleshooting Suggestions * The URL may be incorrect. * The parameters passed to this resource may be incorrect. * A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page. If the error persists please contact the site maintainer. Thank you for your patience. User is Last modified 2002/01/07 16:37:34.6452 GMT+0 © Copyright 2000 Channing Lab Questions or comments about this site? All Rights Reserved. Traceback (innermost last): File /u05/ilocal/opt/Zope-2.4.0-src/lib/python/ZPublisher/Publish.py, line 223, in publish_module File /u05/ilocal/opt/Zope-2.4.0-src/lib/python/ZPublisher/Publish.py, line 187, in publish File /u05/ilocal/opt/Zope-2.4.0-src/lib/python/Zope/__init__.py, line 226, in zpublisher_exception_hook (Object: new_sql_2) File /u05/ilocal/opt/Zope-2.4.0-src/lib/python/ZPublisher/Publish.py, line 171, in publish File /u05/ilocal/opt/Zope-2.4.0-src/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_advancedForm) File /u05/ilocal/opt/Zope-2.4.0-src/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: manage_advancedForm) File /u05/ilocal/opt/Zope-2.4.0-src/lib/python/Shared/DC/Scripts/Bindings.py, line 324, in __call__ (Object: manage_advancedForm) File /u05/ilocal/opt/Zope-2.4.0-src/lib/python/Shared/DC/Scripts/Bindings.py, line 354, in _bindAndExec (Object: manage_advancedForm) File /u05/ilocal/opt/Zope-2.4.0-src/lib/python/App/special_dtml.py, line 241, in _exec (Object: manage_advancedForm) File /ilocal/opt/Zope-2.4.0-src/lib/python/Shared/DC/ZRDB/DA.py, line 549, in manage_product_zclass_info (Object: new_sql_2) File /u05/ilocal/opt/Zope-2.4.0-src/lib/python/ZODB/Connection.py, line 544, in setstate ImportError: (see above)
John Ziniti wrote:
I used to have the Product TrackerBase installed and have removed it. Now, however, attempts to access the "Advanced" tab of ZSQL Methods is broken because a chain of events attempt to get info about a the non-existent Product:
lib/python/Shared/DC/ZRDB/dtml/advanced.dtml calls manage_product_zclass_info
../ZRDB/DA.py.manage_product_zclass_info (line 546) calls self.aq_acquire('_getProductRegistryData')('zclasses')
One of these items is the dict: "{'id': 'Tracker', 'meta_type': 'Tracker', 'product': 'Tracker', 'meta_class': <ZClass instance at d55af0>}
Then, line 548 calls "if hasattr(z._zclass_,'_p_deactivate')".
The attempt to access z._zclass_ fails because this product doesn't exist.
1) the call to z._zclass_ doesn't actuallt do anything except: ## Eek, persistent
2) Is this schizophrenic state my fault?
3) How to rectify the problem (Make *all* of Zope know that TrackerBase is gone)?
Hi John, I'm ready and eager to blame Z classes for everything :) In this case, lets try to force ZClasses to fix themselves up by going into Zope at the python command line prompt % cd lib/python % python2.1.1
import Zope app = Zope.app() app.fixupZClassDependencies(rebuild=1) get_transaction().commit()
Hopefully that will do it for you.
I'm ready and eager to blame Z classes for everything :)
Yeah, me too, hatin' em right about now ...
% cd lib/python % python2.1.1
import Zope app = Zope.app() app.fixupZClassDependencies(rebuild=1) get_transaction().commit()
Hopefully that will do it for you.
Found that on a mailinglist archive last night. Tried it but it doesn't work. The offending Product's ZClasses are still in the Registry (but nowhere else).
John Ziniti writes:
I used to have the Product TrackerBase installed and have removed it. Now, however, attempts to access the "Advanced" tab of ZSQL Methods is broken because a chain of events attempt to get info about a the non-existent Product: ... 2) Is this schizophrenic state my fault? Probably not.
Looks like a bug, you should report to "http://collector.zope.org".
3) How to rectify the problem (Make *all* of Zope know that TrackerBase is gone)? I think this is the right approach.
Dieter
Dieter Maurer wrote:
John Ziniti writes:
I used to have the Product TrackerBase installed and have removed it. Now, however, attempts to access the "Advanced" tab of ZSQL Methods is broken because a chain of events attempt to get info about a the non-existent Product: ... 2) Is this schizophrenic state my fault? Probably not.
I didn't think so, but I would think that the code which deletes Products and their associated ZClasses would be pretty rock solid at this point ??
Looks like a bug, you should report to "http://collector.zope.org".
I would, but as a developer myself, a bug that has a symptom bu no real evidence of a cause is one I wouldn't really think to look at it. "My ZODB is broken" is basically the best I can come up with at this point as a way to explain my problem. I can talk all the way in to Zope.app()._getProductRegistryData() about the way the problem manifests itself, but it happened at some point over the last ... oh ... three months of development??? It'll get ignored, for sure ... ( no offense intended)
3) How to rectify the problem (Make *all* of Zope know that TrackerBase is gone)? I think this is the right approach.
Yep. I really just want to try something akin to: old_registry=app._getProductRegistryData('zclasses') app._SetProductRegistryData('zclasses')=old_registry[1:] ... but I'd like to hear from the guy who wrote _getProductRegistryData first before I even try it on a backup-devlopment-Zope.
participants (3)
-
Dieter Maurer -
John Ziniti -
Matthew T. Kromer