-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm astounded that nobody has come across this before, but the CMFCore.TypesTool.constructContent() function is supposed to return the object id in the event that no RESPONSE is passed in - at least according to CMFPlone.PloneFolder.invokeFactory(). Presently, it in fact returns nothing - breaking this implicit contract. This has the unfortunate effect of *NOT* allowing you to generate your own object id within your object construction function (we have a number of requirements where external systems expect to see id's of particular formats and I don't want to depend upon/pollute the generateId script with specific meta_type requirements). Plone's createObject script can't find this newly constructed object as it's id isn't that generated by the generateId script and fails trying to do a getTypeInfo() call on a None object. I'm posting the patch here because in my mind this *IS* a very important patch and I find the release schedule for CMF{Core,Default} inextricable ;) Alan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFCX+AzCfroLk4EZpkRAq8tAKCVoo1JRfsueciFsJGg4WfMT2sqTgCgoyDF 5XtSXJ1IGopWx0FVQ2kct1M= =MgKf -----END PGP SIGNATURE----- --- CMFCore/TypesTool.py.orig 2005-04-16 01:04:05.181168664 +1000 +++ CMFCore/TypesTool.py 2005-04-16 00:58:19.661695608 +1000 @@ -712,6 +712,7 @@ immediate_url = '%s/%s' % ( ob.absolute_url() , info.immediate_view ) RESPONSE.redirect( immediate_url ) + return ob.getId() security.declarePrivate( 'listActions' ) def listActions( self, info=None ):
On Apr 15, 2005, at 18:38, Alan Milligan wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I'm astounded that nobody has come across this before, but the CMFCore.TypesTool.constructContent() function is supposed to return the object id in the event that no RESPONSE is passed in - at least according to CMFPlone.PloneFolder.invokeFactory().
Presently, it in fact returns nothing - breaking this implicit contract.
Huh? Since when does a software package that builds on top of a core framework define contracts to be fulfilled by the core framework? Excuse me while I chuckle. First of all, the issue really belongs on zope-cmf@zope.org. That's where CMF issues are discussed. Second of all, if you had taken a look at the current CMF-1_5-branch and HEAD in CVS you would have noticed it's already in there. After someone filed a collector issue a while ago and asked for it. What happens on the unsupported and obsolete CMF-1_4-branch, to which Plone still clings, is at this point up to the hardy souls from the Plone community who have stepped forward to maintain it. jens
participants (2)
-
Alan Milligan -
Jens Vagelpohl