[Zope] Zope 2.x bug in loading products

Ross Boylan RossBoylan@stanfordalumni.org
Sat, 20 Nov 1999 12:58:49 -0800


After further experiments, I am ready to call my earlier report a bug.  In
brief:

After a failed import of a product which results in a traceback, if the bug
is fixed but the product still won't load, the product manager still
reports a failed load with the old traceback.

Here are more details.

I will upload a zip file with the offending product to my zope site when
this is done.  I have reproduced the results under Zope 2.0.1 and 2.1.0b2.
I am running on NT 4, SP 4.  Here's the sequence to reproduce the problem:

1) Unzip OrgUser in the Products directory.
2) Edit the 3rd line of OrgUser.py to read
import nonsense
3) start zope
4) Go to the management control panel, products.  OrgUser is reported as a
broken product, with a traceback indicating a failure to import nonsense.
This is *not* the bug; it is proper behavior.
5) Shutdown Zope
6) Edit OrgUser.py to comment out import nonsense
7) Restart Zope
8) The management control panel for products still shows the same as in
step 4.  This *is* a bug, since that line no longer exists.  I presume
there is some other problem with the product which prevents if from loading.
9) If you want shutdown Zope and delete the database.  Recreate it.  Now
you will see no report of OrgUser in the Products listing.

This indicates that when the product fails to load, it leaves the old error
message in place.

I suspect this problem may be caused by a problem in the interaction of
error reporting with transactions boundaries.  I see that when there's an
error, various actions are taken and then the transaction is aborted.
Perhaps this throws out the correct error information.