Re: [Zope] Products breaking other Products?
"James W. Howe" <jwh@allencreek.com> wrote:
I just encountered a problem which scares me to some extent. I have developed my own product with my own set of ZClasses. In my Products folder I had my product, some other products and the PTKBase product. The version of the PTK was from a couple of weeks ago (or so). Yesterday I retrieved the latest PTK stuff from the CVS repository and updated the contents of my products directory with this version of PTK. Suddenly existing instances of ZClasses that I had created previously, were appearing as broken. They apparently couldn't find their product. I was confused by this, because I was able to add new instances of my ZClasses. After posting a message to the zope mailing list, I received a reply which suggested that perhaps a product unrelated to my product was causing a problem. Having nothing else to lose, I replaced my PTKBase with the old version of PTKBase. After restarting Zope my broken ZClasses were once again functioning.
My question is this, why should a product unrelated to my product cause problems with my ZClasses? I feel a bit uncomfortable with the notion that one product can seemingly affect another. I don't believe any of my code relied on anything relating to the PTK. Can someone explain what might have happened?
When Zope starts up, it runs through each Product, importing it as a Python module. My guess is that the broken PTKBase was earlier in the list than your custom product, and that an exception propagated uncaught out of it, interrupting the normal product loading. If this is so, then we need to look at hardening Zope's product loading mechanism against such behavior. Just a guess, Tres. -- ========================================================= Tres Seaver tseaver@palladion.com 713-523-6582 Palladion Software http://www.palladion.com
At 12:14 PM 2/11/00 -0600, Tres Seaver wrote:
"James W. Howe" <jwh@allencreek.com> wrote:
[...]
My question is this, why should a product unrelated to my product cause problems with my ZClasses? I feel a bit uncomfortable with the notion that one product can seemingly affect another. I don't believe any of my code relied on anything relating to the PTK. Can someone explain what might have happened?
When Zope starts up, it runs through each Product, importing it as a Python module. My guess is that the broken PTKBase was earlier in the list than your custom product, and that an exception propagated uncaught out of it, interrupting the normal product loading. If this is so, then we need to look at hardening Zope's product loading mechanism against such behavior.
The strange thing is that none of the products themselves looked broken and I was able to add new instances of ZClasses contained in my product. Only existing ZClasses belonging to my product displayed as broken. I don't know what order Zope brings products in, but my product comes before the PTKBase product if you sort alphabetically. I'll admit that I don't know much about Zope internals, but something seems wrong if installing one product breaks things in another. James W. Howe mailto:jwh@allencreek.com Allen Creek Software, Inc. pgpkey: http://ic.net/~jwh/pgpkey.html Ann Arbor, MI 48103
At 12:14 PM 2/11/00 -0600, Tres Seaver wrote:
"James W. Howe" <jwh@allencreek.com> wrote: [...]
My question is this, why should a product unrelated to my product cause problems with my ZClasses? I feel a bit uncomfortable with the notion that one product can seemingly affect another. I don't believe any of my code relied on anything relating to the PTK. Can someone explain what might have happened?
When Zope starts up, it runs through each Product, importing it as a Python module. My guess is that the broken PTKBase was earlier in the list than your custom product, and that an exception propagated uncaught out of it, interrupting the normal product loading. If this is so, then we need to look at hardening Zope's product loading mechanism against such behavior.
As a followup to a message I just sent, I realize that in addition to the PTKBase product, I also had the DemoPortal product installed. This product did appear in the list before my product and so could have caused the problem you describe. What may have happened is that I had the DemoPortal from the older PTKBase. I then upgraded to the newer version. Perhaps this broke the older DemoPortal. I do seem to remember having trouble deleting it (basically I wasn't able to delete it). Now that I'm back to using the older PTKBase, I was able to delete the DemoPortal product from my list (along with PTKBase). James W. Howe mailto:jwh@allencreek.com Allen Creek Software, Inc. pgpkey: http://ic.net/~jwh/pgpkey.html Ann Arbor, MI 48103
participants (2)
-
James W. Howe -
Tres Seaver