[Zope-CMF] problem with CMFTopic.

Dieter Maurer dieter@handshake.de
Wed, 2 Apr 2003 20:51:36 +0200


Romain Slootmaekers wrote at 2003-4-2 17:12 +0200:
 > I have some problems with CMFTopics being updated wrongly:
 > 
 > I built a custom CMF content type X, and I have the objects listed in a 
 > Topic findX.
 > 
 > after I edit an instance x of X somewhere in the CMF site, the object is 
 > listed twice in the CMFTopic findX.
 > 
 > My custom type X basically is declared like this:
 > 
 > class X(PortalContent, DefaultDublinCoreImpl):
 >     """ PortalContent extends CMFCatalogAware """
 >     ...
 >     def edit(self,...):
 >          ...
 >          self.reindexObject() # make the catalog see our changes....
 > 
 > 
 > 
 > The funny thing is that a subsequent edits of the object will not make 
 > it appear more than twice in the topic.
 > 
 > Anyone any clues ??

Topics are canned catalog searches.

A catalog search should only return duplicates when
the object is catalogued with two different "uid"s.

When you do not specify the "uid", the object's physical
path is used.

Can you check whether you object is indexed twice in the
catalog (you would use the "getPath" method on the respective "brain"
objects).


Dieter