Menu

#399 Infinite recursion when adding a definition

open
5
2009-06-08
2009-06-08
Anonymous
No

If you use collective.indexing and you try to add a definition then either zope stops or ends up in an endless recursion. This is due to this method:

def indexObject(self):
"""Index object in portal catalog and glossary catalog"""
BaseContent.indexObject(self)
cat = self.getCatalog()
cat.indexObject(self)

Calling BaseContent.indexObject(self) eventually results in calling this method again.

This is what Andreas Zeidler responded when I reported the issue to him:

that's a known issue (http://plone.org/products/collective.indexing/issues/3), but i haven't had time to look into it yet. i've just spent about half an hour now, however. the problem's the way ploneglossary is overriding the indexing methods — it should really just use archetypes' (existing) multiplex functionality to register its content type with an extra catalog. that can even be done via gs afaik. i'm not gonna fix that, though. sorry... :)

Discussion

  • Danny Bloemendaal

    This was reported by me (danny bloemendaal). Forgot to log in

     
  • Ralph Jacobs

    Ralph Jacobs - 2009-07-20

    I have the same problems. Endless recursion.

     
  • Gilles Lenfant

    Gilles Lenfant - 2009-07-20

    Hi, the problem is :

    * Each glossary has its own inner ZCatalog
    * There may be as many glossaries as needed in a site
    * Using catalog multiplex, all catalogs must be known at install time

    Fixing this issue will need to change in depth the way PloneGlossary indexes its terms, using an unique additional ZCatalog instead of adding an additional catalog to each glossary.

    We have no time for this at the moment, but feel free to make a branch to fix this.

     
  • Ralph Jacobs

    Ralph Jacobs - 2009-07-21

    hi gilles, thanks for replying; It sounds like the problem Andreas Zeidler also describes but a little bit different, see: http://plone.org/products/collective.indexing/issues/3.
    Thanks for looking into it and maybe i can find some time to look in to it.

     

Log in to post a comment.

MongoDB Logo MongoDB