[Zope] Need ZCatalog help

Stuart Woolford stuartw@newmail.net
Thu, 16 Sep 1999 14:10:17 +1200


On Thu, 16 Sep 1999, Kevin Dangoor wrote:
> >happily, I've got a ZClass working with auto-adding to a catalogue called
> >'Catalog'  in the same directory as I dtml-create the ZClass objects,
> however,
> >I've noticed one strange thing (which I'm sure is my fault..) - when a new
> item
> >gets auto-added, the ZSearch I have in that same directory suddenly only
> finds
> >one item in the ZCatalogue, and NONE of the meta-data is there, only the ID
> >(and modification time), however, all gets fixed if I open the ZCatalogue
> in
> >manage and do an update of it's catalogues objects..
> >
> >Could someone please tell me what I'm going wrong???? I would have expected
> the
> >auto-adding feature (which is basically working) to just make this happen
> >smoothly, as it is presented as a totally automatic system (which is good)
> :)
> 
> When you change/edit the properties for the ZClass instance, these changes
> do not automatically make it into the catalog.
> 
> You ZClass_add method probably has a call to manage_editProperties or
> manage_changeProperties... *After* that call, do
> <dtml-call reindex_object>
> 
> Also, you can't use the normal property editing page. You need to create
> your own edit page with a simple DTML method to save the changes like so:
> <dtml-call "manage_editProperties(REQUEST)">
> <dtml-call reindex_object>

Damb you people are good, you have got it in one.
For some reason I assumed it would be indexed after the Class_add had completed
(as there is little chance of the object containing anything useful before
this?)

------------------------------------------------------------
Stuart Woolford, stuartw@newmail.net
Unix Consultant.
Software Developer.
Supra Club of New Zealand.
------------------------------------------------------------