[Product-Developers] Re: Programatically only addable content types
Ricardo Newbery
ric at digitalmarbles.com
Wed Feb 11 22:56:27 UTC 2009
[Please use "replay all" to stay on the list so that others with
similar issues may benefit]
On Feb 11, 2009, at 1:35 PM, Vanderson Mota dos Santos wrote:
> Well, after the object creation, i call _renameAfterCreation() that
> raises the error described in my previous post. Sorry guys, i've
> hurried up to answer before debugging. It will not happen again. =)
>
> 2009/2/11 Vanderson Mota dos Santos <vanderson.mota at gmail.com>
> "from Products.CMFPlone.utils import _createObjectByType
> _createObjectByType(type_name, container, id)"
>
> Just Followed your tip, but, didn't worked. Keeps bugging me with
> the "Disallowed subobject type" error
>
> Any other stuff that i can try?
What do you mean, you call _renameAfterCreation() ? This is a method
you can redefine, but I don't think you're meant to call it explicitly.
Note, I believe there is a bug in LinguaPlone that can trip you up
whenever you try to edit an existing object that would normally be
disallowed in the container. One solution is to set
_at_rename_after_creation=False in the contenttype. Perhaps this has
something to do with your problem?
Ric
More information about the Product-Developers
mailing list