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

jimbo jimbo@tacomaplace.com
Tue, 29 May 2001 01:15:38 -0700


Hi,
   Thanks that helped.  I somehow overlooked the Pythonscript constuctor part in the portlpoll tutorial this time.
  I'm now able to add the Meeting product based on the following;
ZObject, _ZClass_for_PortalContent, ZObjectManager, _ZClass_for_DefaultDublinCoreImpl.

  I tried to basically follow the same procedure to add another object into the meeting class and now get the following error.

Error type: Unauthorized
Error value: The object /tacomaplace/mtg1/Attendee, which is contained in "/tacomaplace/mtg1", is marked as private.


<!--#comment-->
Make the URL ID autogenerated
<!--#/comment-->
<dtml-call "REQUEST.set('ts', ZopeTime())">
<dtml-call "REQUEST.set('Autoid',_.str(_.int(ts)))">
<dtml-call "REQUEST.set('id', Autoid)">

<Highlighted_line>
<dtml-with "Attendee.createInObjectManager(REQUEST['id'], REQUEST)">
</Highlighted_line>

<dtml-call "propertysheets.Basic.manage_editProperties(REQUEST)">


The portal is tacomaplace, and mtg1 is the public Meeting. I've tried a quick search on creating public objects in the cmf and not much out there.  I know check the source.  Can I get pointed in the right direction?
TIA
-Jimbo




---------- Original Message ----------------------------------
From: Tres Seaver <tseaver@palladion.com>
Date: 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
>
>