Personal tools

Mar 01, 2010

Integration of PloneGazette with

Filed Under:

The new product collective.discussionintegration.plonegazette provides the integration of PloneGazette and

The product is becoming the standard way to add comments in Plone. If both products and Products.PloneGazette are installed the creation of any PloneGazette content type fails, because PloneGazette content types not provide the adapter for "IConversation":

Traceback (innermost last):
  Module, line 29, in total_comments
TypeError: ('Could not adapt', <NewsletterTheme at /ausl/newslettertheme.2010-01-26.2440135204>, <InterfaceClass>)



To solve the problem we set an adapter for the types defined in Products.PloneGazette. This adapter provides the interface "IConversation" of The adapter provides the attribute "total_comments" and the method "enabled", which returns False (means that the commeting is disable).



So you can create objects Newsletter without any problem.

Unfortunately PloneGazette does not define an interface for each content types, so through zcml we say that these content type implements a particular interfaces.Then we give the adapter for those interfaces.

The new product collective.discussionintegration.plonegazette makes possible the creation of the PloneGazette content types if there is an installation of in your instance.