[Zope-dev] CMF TypesTool breaks id

2005-04-15 Thread Alan Milligan
-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.py2005-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 ):
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] CMF TypesTool breaks id

2005-04-15 Thread Jens Vagelpohl
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 [EMAIL PROTECTED] 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
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Editing using Firefox

2005-04-15 Thread Jeff Nielsen








Sorry in advance if this issue has been covered a bzillion
times already



Im playing with editing my Zope site using Firefox as
I can open Document and Method objects in tabbed windows and switch back and
forth between them. However, the tab title, based on the page title, for each
object is just Zope. Is there a way to get the object name to be
used as the page title and hence the tab title? Ive searched about a bit
for an answer and no joy so far.



Jeff Nielsen

UgoFast

http://www.UgoFast.com

[EMAIL PROTECTED]








___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )