[Zope-CMF] CMFOption trouble -- or maybe Factory Based Type Info trouble

Lynn Walton waltonl@franklin.edu
Mon, 24 Sep 2001 10:12:26 -0500


That did the trick. Thanks Tres and Jeff!
Lynn

Tres Seaver wrote:

> Lynn Walton wrote:
>
> > Anyone know why I wouldn't be getting all the options I should in the
> > dropdown list, be when I'm in portal_types and click to Add Factory
> > Based Type Info?
> > On the screen where I go to give the id and select the "Use default type
> > information" I only see None, CMFCore, CMFDefault, and CMFTopic. But
> > I've installed other things and seen them before, like
> > CMFBoringContent.  And just now I installed CMFOptions following the
> > instructions, but CMFOptions choices didn't appear in the list.   Anyone
> > experienced this that can help?
> >
> > Using Zope 2.4.1, Solaris 2.8. Untarred and restarted and CMFOptions is
> > under Products, but when I go to do this step:
> > ----
> > 1.Click on portal_types. Click the drop down box and add a Factory-based
> > Type Information item.
> > Give the new item an id of "CMFExternalImage" BE SURE to select
> > "CMFOptions: Portal External Image" from the "Use default type
> > information" dropdown box.
> > -----
> > "CMFOptions: Portal External Image"  isn't in the dropdown. No
> > CMFOptions is in the dropdown.  Do you know why?
>
> At a guess, the version of CMFOptions you have (probably 1.11) has
>
> not yet caught up with current CVS of the CMF.  To verify, check the
> 'CMFOptions' object in 'Control_Panel/Products' -- is it "broken"?
> Does the traceback complain about a NameError for 'afterCreate'?
>
> If so, you will need to patch CMFOptions as follows:
>
> ----------- cut here ---------------
> --- CMFExtFile.py       Thu Jun 21 12:05:39 2001
> +++ /home/tres/projects/cmf_test/CMFOptions/CMFExtFile.py       Sat Aug  4 10:19:48 2001
> @@ -108,7 +108,7 @@
>   from Products.CMFDefault.DublinCore import DefaultDublinCoreImpl
>
>   from Products.CMFCore import CMFCorePermissions
> -from Products.CMFCore.WorkflowCore import WorkflowAction, afterCreate
> +from Products.CMFCore.WorkflowCore import WorkflowAction
>
>   from os.path import isfile
>   from Products.CMFOptions.ExtFile import ExtFile
> @@ -183,7 +183,6 @@
>                   , format, language, rights
>                  )
>           self._setObject(id, tempExtFile)
> -        afterCreate(self._getOb(id))
>
> --- CMFExtImage.py      Thu Jun 21 12:04:38 2001
> +++ /home/tres/projects/cmf_test/CMFOptions/CMFExtImage.py      Sat Aug  4 10:19:58 2001
> @@ -112,7 +112,7 @@
>   from Products.CMFDefault.DublinCore import DefaultDublinCoreImpl
>   from os.path import isfile
>   from Products.CMFCore import CMFCorePermissions
> -from Products.CMFCore.WorkflowCore import WorkflowAction, afterCreate
> +from Products.CMFCore.WorkflowCore import WorkflowAction
>   from Products.CMFOptions.ExtFile import ExtImage
>   from types import IntType, StringType  #needed to use ExtImage properly
>   import string #ditto
> @@ -184,7 +184,6 @@
>                   , format, language, rights
>                  )
>           self._setObject(id, tempExtImage)
> -        afterCreate(self._getOb(id))
>
> ------------ end cut here -----------------
> Tres.
> --
> ===============================================================
> Tres Seaver                                tseaver@zope.com
> Zope Corporation      "Zope Dealers"       http://www.zope.com