[Zope-CMF] Users are not able to add custom factory types such as CMFPhotoalbum and MeetingCMF

Tres Seaver tseaver@palladion.com
Mon, 28 May 2001 16:46:41 -0400


jimbo wrote:


 > I've successfully installed CMFOptions and CMFAudio. I've also
 > successfully created the poll tutorial and my very own simple
 > custom portal product.  I think the problem is some kind of
 > security issue. I'm also not sure if I'm calling the right
 > constructor. I'm calling the default one that creates my zclass
 > product. I've tried manage_addMeetingCMF and also addMeetingCMF
 > and no luck.
 >
 > The initial view is the manage_addForm for the Zclass.
 > Here is the traceback
 >
 > An exception occurred in a DTML method or document.
 >
 > Error type: NameError
 > Error value: ManagedCMFMeeting
 >
 > Innermost method: /tacomaplace/ManagedCMFMeeting_add
 > Name not found or not allowed: ManagedCMFMeeting
 >
 > Namespace Stack (innermost entry at top)
 > ID Type Contains name?
 > (N/A)  mapping with keys: ['document_id', 'document_title']  No
 > ?  InstanceDict  No
 >
 > Source of /tacomaplace/ManagedCMFMeeting_add with fault:

How exactly have you registered this type?  The factory for your ZClass
product has to be called in the context of the product's dispatcher, e.g.:

   product = context.manage_addProduct[ 'ManagedCMFMeedingProduct' ]
   product.ManagedCMFMeeting_add( context, context.REQUEST )

Also, the fix to allow DTMLMethods as the "Factory Method" of
FactoryTypeInformation objects was added after CMF 1.0, so you will
need either to upgrade, or to add a PythonScript which takes only the
'id' parameter and then calls the DTMLMethod.

Tres.
--
===============================================================
Tres Seaver                                tseaver@digicool.com
Digital Creations     "Zope Dealers"       http://www.zope.org