[Zope-CMF] Re: Repurposing content: Need to add navigation properties as well?

Jean Lagarde jlagarde@bigfoot.com
Sat, 31 Aug 2002 12:59:44 -0700


Hmm, well at least I solved my problem, adding the required transitions 
by calling the addTransitionFor method of the navigation tool from a 
Python script (kept on getting authorization errors when trying to add 
the properties directly through the ZMI). I guess in a product, that can 
be done as part of product initialization, but since I was trying to 
follow the repurposing content example, I had to do it by hand.

My attempt at customizing the navigation_properties in plone_script did 
not seem to do anything, so I have removed that customization.

Should there have been an easier way to make that example work?

Cheers,

Jean

Jean Lagarde wrote:

> Started to play with CMF(Plone) as a possible tool for our 
> organization (BTW, another option we are considering is Website 
> Director Pro, of which I know nothing of; anybody who knows both could 
> provide a quick comparison of features?).
>
> Made some good progress customizing Plone to my taste, but now I am 
> stuck following the "repurposingContent" example given on plone.org. 
> The problem is that on attempting to save from the edit form for the 
> new type I have created, I get a traceback that seems to be caused by 
> getNextRequestFor returning an empty string as the next action (see 
> below for traceback). In looking around, I get the impression that new 
> navigation transitions must be created for the new type (i.e. 
> document.newtype_edit.success -> action:view), something that isn't 
> mentionned in the example walkthrough. However, I haven't so far been 
> able to make this work. Portal_properties/navigation_properties seemed 
> like what I was looking for, but that form doesn't allow me to edit 
> it. Then I found portal_skins/plone_scripts/form_scripts, which I 
> customized to add the transition I seemed to need, but I still get the 
> same traceback. At this point I'm left scratching my head and hoping 
> that someone can give me a clue...
>
> Cheers,
>
> Jean
>
> Traceback (innermost last):
>  File C:\PROGRA~1\mars2.5\lib\python\ZPublisher\Publish.py, line 150, 
> in publish_module
>  File C:\PROGRA~1\mars2.5\lib\python\ZPublisher\Publish.py, line 114, 
> in publish
>  File C:\PROGRA~1\mars2.5\lib\python\Zope\__init__.py, line 158, in 
> zpublisher_exception_hook
>    (Object: memberRationale.2002-08-30.1226)
>  File C:\PROGRA~1\mars2.5\lib\python\ZPublisher\Publish.py, line 98, 
> in publish
>  File C:\PROGRA~1\mars2.5\lib\python\ZPublisher\mapply.py, line 88, in 
> mapply
>    (Object: rationale_edit)
>  File C:\PROGRA~1\mars2.5\lib\python\ZPublisher\Publish.py, line 39, 
> in call_object
>    (Object: rationale_edit)
>  File C:\PROGRA~1\mars2.5\lib\python\Shared\DC\Scripts\Bindings.py, 
> line 252, in __call__
>    (Object: rationale_edit)
>  File C:\PROGRA~1\mars2.5\lib\python\Shared\DC\Scripts\Bindings.py, 
> line 283, in _bindAndExec
>    (Object: rationale_edit)
>  File 
> C:\PROGRA~1\mars2.5\lib\python\Products\PythonScripts\PythonScript.py, 
> line 291, in _exec
>    (Object: rationale_edit)
>    (Info: ({'script': <PythonScript instance at 02BB18C8>, 
> 'context': <Document instance at 021CD260>, 'container': 
> <CMFSite instance at 01A216C0>, 'traverse_subpath': []}, 
> ('structured-text', 'Blah', <ZPublisher.HTTPRequest.FileUpload 
> instance at 017265DC>, '', ' Change ', '', 'Blah', 
> 'memberRationale.2002-08-30.1226'), {}, ('', '', ' Change ', '', '', '')))
>  File Script (Python), line 28, in rationale_edit
>  File 
> C:\PROGRA~1\mars2.5\lib\python\Products\CMFPlone\NavigationTool.py, 
> line 322, in getNextRequestFor
>    (Object: portal_navigation)
>  File C:\PROGRA~1\mars2.5\lib\python\Products\CMFCore\TypesTool.py, 
> line 227, in getActionById
>    (Object: memberRationale)
> TypeError: No action "" for type "memberRationale"
>
>