Ticket #1673 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Newsletter content is not send by email.

Reported by: avoinea Assigned to: avoinea
Priority: P1 Milestone: CPS 3.4.2
Component: CPSSubscriptions Version: TRUNK
Severity: normal Keywords: NewsLetter, CPSSubscriptions, Notifications, notify, notifyRecipients
Cc:

Description

Even you specify portal_types or event types in CPSSubscription render content related fields.

Change History

06/15/06 16:02:13 changed by avoinea

  • status changed from new to closed.
  • resolution set to fixed.

Fixed by revision [46530]

-            getattr(object, 'portal_type', '') in rendered_ptypes or
+            getattr(object_, 'portal_type', '') in rendered_ptypes or
             infos.get('event', '') in rendered_events):
             # Is the object_ a CPSDocument ?
-            if hasattr(aq_parent(aq_inner(object_)), 'render'):
-                body = object_.getContent().render(proxy=object_)
+            doc = hasattr(object_, 'getContent') and object_.getContent()
+            if hasattr(doc, 'render'):
+                body = doc.render(proxy=object_)
                 mime_type = 'text/html'