[Zope-CMF] manage_afterAdd not being called?
seb bacon
seb@jamkit.com
Thu, 14 Jun 2001 16:11:36 +0100
* Shane Hathaway <shane@digicool.com> [010614 15:29]:
> seb bacon wrote:
> >
> > I'm adding some content to a folder like so:
> >
> > f = portal_membership.getHomeFolder(member_id)
> > f.invokeFactory('MailMessage',id)
> > o = f._getOb(id)
> > o.edit(file)
> >
> > But it's not getting indexed, which I presume is because
> > manage_afterAdd isn't getting called. Can anyone tell me why this is?
> > Should I be creating the content in a different way?
I should I that I can confirm it's manage_afterAdd which isn't getting
called, since by adding o.manage_afterAdd(o,f) to the above code,
everything works fine.
> You derived from PortalContent, right?
Yes - from Document and DefaultDublinCoreImpl, to be exact.
> Are you using the latest CVS?
I *think* so...I've been having wierd problems with cvs ups lately.
> Any special workflow?
No, I'm using a slightly adapted DefaultWorkflow which works for every
other Type.
> Are you sure the catalog isn't hiding it from you
> (are you looking for it as an anonymous user)?
Well, it *could* be something to do with the fact that I do a
o.manage_setLocalRoles(member_id,['Owner'])
after the above, but I can't see how / why. Especially since it works
once I explicity call manage_afterAdd().
I'll be uploading my latest stuff to the dogbowl later, so if you've
got some patience and want to try installing it, you can see for
yourself ;-)
seb