[Zope-dev] ZCatalog becoming empty when using "Update" in con junction with ZPatterns

sean.upton@uniontrib.com sean.upton@uniontrib.com
Mon, 03 Dec 2001 11:05:47 -0800


Are you using any virtual hosting setup of any kind?  If so, switching from
using a base class of CatalogAware.CatalogAware to
CatalogPathAware.CatalogAware might solve this problem...

Sean

-----Original Message-----
From: Jean Jordaan [mailto:jean@upfrontsystems.co.za]
Sent: Monday, December 03, 2001 1:59 AM
To: zope-dev@zope.org
Subject: [Zope-dev] ZCatalog becoming empty when using "Update" in
conjunction with ZPatterns


Hi all

I had a ZCatalog with about 3500 DataSkin instances indexed. Then 
I started to index instances of a regular ZClass as well. Then I 
added another index, to catalog an additional property of this 
ZClass, and hit "Update Catalog".

When Zope returned from updating, there were no records in the 
Catalog, though the Vocabulary was intact. I see that I cannot
search for the DataSkin metatypes using the "Find Objects"
ZCatalog tab: they don't show up in the "Find objects of type"
field. So perhaps this is why updating failed.

However, now the Catalog is not accepting any entries. I originally
did the cataloging using this kind of loop on all the classes I 
wanted indexed::

  ids = container.Roundup.Issues.defaultRack.getPersistentItemIDs()
  for id in ids:
      object = container.Roundup.Issues.defaultRack.getItem(id)
      Catalog.catalog_object( object
                            , string.join( object.getPhysicalPath()
                                         , '/'))

When I try to run that again, I still get "There are no objects in 
the Catalog." upon return. When I run it using a newly created catalog 
('testCatalog') instead, it works fine.

Could anyone perhaps explain what's happening here? 

Regards,
Jean


_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )