Re: TR : RE : [CPS-devel] creating folders in a cps site when importing profile

Georges Racinet gracinet at nuxeo.com
Wed Mar 14 11:27:44 CET 2007


On Mar 14, 2007, at 11:09 AM, Winterflood, Jonathan wrote:

> Forwarding to the list
>
> De: Georges Racinet [mailto:gracinet at nuxeo.com]
> Date: mer. 14/03/2007 10:33
> À: Winterflood, Jonathan
> Objet : Re: RE : [CPS-devel] creating folders in a cps site when  
> importing profile

Sorry list, I hit the wrong button !

Marc-Aurèle is right, also ("Folder" is both a Zope meta_type and a  
CMF portal_type).
You most probably have to make yours (can use one of the folder types  
you intend
to put therein).

Last remark  and then I hope everybody will link to that thread :-)

The logic of the roots importer is exceptional in the sense that you  
have to explicitely prescribe all objects to recurse into.
Example:
	To change a field from a schema in an extension profile, you don't  
need to declare the schema  again in schemas.xml, nor the field it  
self in my_schema.xml. All you need is the schemas/my_schema/ 
my_field.xml file in the extension profile.
	To change anything to the "members" root .cpsworkflow_configuration,  
you must declare again "members" in you roots.xml,  
the .cpsworkflow_configuration in "members.xml" and so on

Subfolders of roots (e.g, sections/arts) can be created like this as  
of CPS 3.4.3

This is designed to avoid crawling the whole content.


>
>
> Le 14 mars 2007, à 10:09, Winterflood, Jonathan a écrit :
>
> > I'm kind of wary about using the trunk, especially as the site isn't
> > just for me, but needs to be distributable.
> >
> > Should I swallow this and just use the trunk, or are there any other
> > reasons for me to keep my current config?
> > (Zope 2.9.4, CPS 3.4.2-2 (cpsdefault 3.45.2))
> >
> > Is there any folder-type object I can create with my current  
> version?
> >
> > I tried this:
> > <?xml version="1.0"?>
> > <roots>
> >  <object name="members" portal_type="Members Workspace"/>
> >  <object name="sections" portal_type="Section"/>
> >  <object name="workspaces" portal_type="Workspace"/>
> >  <object name="DBR_data" portal_type="Folder"> </object>
> > </roots>
>
>
> >
> >
> > Which gave me:
> >   Error Type: WorkflowException
> >   Error Value: No initial_transition to create DBR_data
> > (type_name=Folder) in cps
> >
>
> Since topmost ..cps_workflow_configuration objects are in the  
> roots, you
> can't use them for root creation.
> Instead, one uses the default (not placeful) workflow association held
> in the workflow tool. You have to make one for the
> "Folder" portal_type (better to define a specific one, btw). Check how
> it is declared for Workdpace in
> CPSDefaults/profiles/default/workflow.xml, IIRC
>
>
> > I didn't really expect it to work, just making sure I'd be doing the
> > right thing if I had the right version
>
> Not a version problem,  don't worry. The core components of CPS 3.4  
> are
> quite stable.
>
> >
> >
> > Thanks,
> > Jonathan
> >
> >
> >
> > De: cps-devel-bounces at lists.nuxeo.com de la part de M.-A. DARCHE
> > Date: mar. 13/03/2007 16:52
> > À: CPSdevel
> > Objet : Re: [CPS-devel] creating folders in a cps site when  
> importing
> > profile
> >
> >
> > Winterflood, Jonathan a écrit :
> > > Hi all,
> > >
> > > My product is designed as a profile to be imported onto a  
> CPSDefault
> > > site, and I need to create some 'Folder's to hold some data it  
> uses
> > > I'd like to create them when the import is done, but I can't  
> figure
> > out
> > > where, or which code to use for it
> > >
> > > So far the folders were created the first time they were needed
> > (messy,
> > > needs a test for every use, breaks if the first user isn't admin
> > etc.)
> > > with the following code:
> > >
> > context.portal_url.getPortalObject().manage_addProduct 
> ['OFSP'].manage_a
> > ddFolder('DBR_data')
> > >
> > > I'm guessing I should do it in the import method for the Tool  
> (based
> > on
> > > the vogon tool), but then the context isn't the same (obviously..)
> > > Any pointers would be appreceated :)
> > >
> >
> >
> > The following changeset http://svn.nuxeo.org/trac/pub/changeset/ 
> 51312
> > describes how to create any objects at the root of a CPS site  
> through
> > the XML profile files.
> >
> > This is used to create the FckHTTPCache Accelerated HTTP Cache  
> Manager
> > at the site root.
> >
> > Creating Zope objects like this is only possible in the trunk since
> > this was a very recent addition.
> >
> >
> > --
> > Marc-Aurèle DARCHE
> > Open Source Enterprise Content Management (ECM)   http:// 
> www.nuxeo.org/
> > NUXEO (Paris, France)                             http://nuxeo.com/
> >
> > _______________________________________________
> > cps-devel mailing list
> > http://lists.nuxeo.com/mailman/listinfo/cps-devel
> > This message contains information that may be privileged or
> > confidential and is the property of the Capgemini Group. It is
> > intended only for the person to whom it is addressed. If you are not
> > the intended recipient, you are not authorized to read, print,  
> retain,
> > copy, disseminate, distribute, or use this message or any part
> > thereof. If you receive this message in error, please notify the
> > sender immediately and delete all copies of this message.
> >
> > _______________________________________________
> > cps-devel mailing list
> > http://lists.nuxeo.com/mailman/listinfo/cps-devel
>
>
> This message contains information that may be privileged or  
> confidential and is the property of the Capgemini Group. It is  
> intended only for the person to whom it is addressed. If you are  
> not the intended recipient, you are not authorized to read, print,  
> retain, copy, disseminate, distribute, or use this message or any  
> part thereof. If you receive this message in error, please notify  
> the sender immediately and delete all copies of this message.
>
> _______________________________________________
> cps-devel mailing list
> http://lists.nuxeo.com/mailman/listinfo/cps-devel

---------
Georges Racinet,   Nuxeo SAS
Open Source Enterprise Content Management (ECM)
Web: http://www.nuxeo.com/ and http://www.nuxeo.org/ - Tel: +33 1 40  
33 79 87






This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.