[Zope-CMF] Error with CMF WIki and CMF 1.3 - is acquisition biting my butt?

Tres Seaver tseaver@zope.com
11 Aug 2002 14:51:59 -0400


On Sun, 2002-08-11 at 13:11, Heimo Laukkanen wrote:
> Update on the issue. I checked out the files throwing errors. 
> wikipage_create_handler and the form wikipage_create_form.
> 
> wikipage_create_handler was following:
> --------------------------------------
> 
> <dtml-call expr="create_page( page=REQUEST['page']
>                              , text=REQUEST['text']
>                              , log=REQUEST['log']
>                              )">
> <dtml-call expr="REQUEST['RESPONSE'].redirect(
>                             this().aq_parent[page].wiki_page_url()
>                             + '?portal_status_message=Page+added.' )">
> 
> 
> I didin't see what is wrong with that - and I really didn't want to 
> start grokking DTML anymore, so I did the same thing with PythonScript. 
> And it started to work. Difference between the dtml and PS is that on 
> the redirect page is explicitly taken from request, where as in dtml it 
> was taken from the namespace - and this was propably one of the reasons 
> for my errors.
> 
> wikipage_create_handler - Python Script
> ----------------------------------------
> 
> request = container.REQUEST
> RESPONSE =  request.RESPONSE
> 
> context.create_page(page=request['page'],text=request['text'], 
> log=request['log'])
> RESPONSE.redirect( 
> context.aq_parent[request['page']].wiki_page_url()+'?portal_status_message=Page+added.' 
> )
> 
> 
> Could someone test and try that if they will have the same happen to 
> them too, and if this will fix it. Possibly this could also be updated 
> to that unmaintained CMFWiki in CVS.

I checked in a PythonScript version of 'wikipage_create_handler' back at
the end of July, because I had the same problem you did::

 ## Script (Python) "wikipage_create_handler"
 ##bind container=container
 ##bind context=context
 ##bind namespace=
 ##bind script=script
 ##bind subpath=traverse_subpath
 ##parameters=page,text,log=''
 ##title=
 ##
 context.create_page( page, text, log )
 context.REQUEST['RESPONSE'].redirect( context.wiki_page_url()
                                     +
'?portal_status_message=Page+added.' )

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com