David Bain wrote:
> 
> 1. I removed the whole initializeArchetype thing
> 2. moved that code into a method called
> 'createMeetingCollectionsAfterCreation'
> 3. added a subscriber directive in my configure.zcml which "listens" for
> an
> ObjectAddedEvent
> 
> Something like this:
> 
> 
> 

I had the same problem, and i benefited greatly from the posts her. Thanks
David for bringing this up. I still have this problem, however.

My goal is that a newly created object of my custom type vrotje (sorry,
Dutch) will have a subfolder with id "homepage"  and title "Nieuwe map".

My events/vrotje.py looks like

def addStandardContentContainers(vrotje, event):
    """ Add standard (smart) folders and documents after object creation
    """
    vrotje.invokeFactory("Folder", id="homepage", title="Nieuwe map")


What happens now is that the subfolder "homepage" gets created but isn't
renamed. (The new vrotje is renamed, so it gets its title in its url, as
expected.) 
So I end up with all automatically created content getting those long
temporary names.
-- 
View this message in context: 
http://www.nabble.com/broken-rename-after-creation-due-to-initializeArchetype-tweak-tp12922314s20094p14299302.html
Sent from the Product Developers mailing list archive at Nabble.com.
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to