[Zope-CMF] DefaultDublinCoreImpl no more auto catalog itself in CMF-1.3beta1?

Tres Seaver tseaver@zope.com
03 May 2002 12:01:00 -0400


On Fri, 2002-05-03 at 11:08, Luca Olivetti wrote:
> [sorry I didn't realize this before though I upgraded to CMF-1.3beta1 as 
> soon as it was out, my project is kinda dormant and I didn't test it 
> thoroughly]
> 
> I have a CMF type which has in its ancestor DefaultDublinCoreImpl. In 
> its __init__ method it was sufficient to call 
> DefaultDublinCoreImpl.__init__ to have it automagically add to the 
> catalog, at least it did with CMF-1.2.
> Now with CMF-1.3beta it's no longer so and it breaks my product.
> I could find anything about this neither in the tracker (I searched for 
> pending and solved bug with subject catalog and then 
> DefaultDublinDoreImpl) nor in the list archive (looked only in 
> april/may, since cmf-1.3b1 was released at the beginning of april).

Content can't be appropriately indexed inside the constructor, as it
doen't (yet) have an acquisition context in which to search for the
catalog.

> Is it a bug or a feature?

The removal of the call to 'reindexObject' in 'DDI._editMetadata' was
part of fixing bugs related to the issue I just mentioned.

> What should I do?

Mix 'CMFCore.CMFCatalogAware.CMFCatalogAware' into your class,
which will call 'self.indexObject()' in its 'manage_afterAdd'
and 'manage_afterClone' methods.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com