[Zope] VHM, ZClass double entry - desperate
Milos Prudek
milos.prudek@tiscali.cz
Sat, 05 Oct 2002 21:16:04 +0200
I'm desperate.
ZClass instances generate doubled entries in ZCatalog under VHM.
ZClass inherits ZObject, CatalogPathAwareBase, ZObjectManager.
The first set of entries is created through Find Objects ZMI tab. These
entries display absolute path in Object Identifier column, but they
return correct, i.e. relative to VHM root, path through
ZCatalog.getPath(). That's ok.
The second entry gets created because of the following line in
index_html DTM Method of ZClass:
<dtml-call "propertysheets.data.manage_changeProperties(readers=readers+1)">
This double entry displays relative path in Object Identifier column and
in ZCatalog.getPath(). Not a problem per se, but every instance is
recorded twice in ZCatalog, and that's the bummer.
If I remove the line above from index_html of the ZClass, double entry
is not created. If I put it back, double entry is created.
It would seem that the problem is isolated. Therefore I tried to
replicate the error with a fresh ZClass:
- create product p
- create zclass z, with CatalogPathAware
- create folders a,b,c anywhere
- add propertysheet ps
- add property display(int) to ps
- add method index_html which call nethod inc_display
- add method inc_display
- add ZCatalog Cat
- find objects of type: 'z'
- run index_html and see if double entry is created.
Result: double entry is not created. I'm unable to reproduce the problem
on a fresh ZClass. The original ZClass is so complex that it would take
many hours to decompose it.
What could it be??
--
Milos Prudek