[Zope-PTK] Debugging PTK II
Shane Hathaway
shane@digicool.com
Mon, 14 Aug 2000 16:30:43 -0400
Fabio Forno wrote:
>
> Some more bugs and corrections:
>
> Problem: it wasn't possible to change the effetive_date and the comment
> of a portal content status
>
> Fixes:
> I've changed the content_status_modify method of the Portal ZClass in
> this way, so that the comment and the effetive_date input names don't
> conflict with the corresponding attributes (for some reason I don't
> understand yet, with the same name they were set always to None):
I think what you really want to do here is get the values directly from
REQUEST. Attributes, acquisition, and method calls come before REQUEST
name lookups, you see. Changes made below:
> <dtml-let oldloc="this().absolute_url()"
> newloc="portal_workflow.changeStateFor(this(),
> REQUEST['transition'], REQUEST['comment'],
> effective_date=REQUEST['effective_date']).absolute_url()">
> <dtml-if expr="oldloc != newloc">
> <dtml-call expr="RESPONSE.redirect(newloc)">
> <dtml-else>
> <dtml-return expr="content_status_form(_.None, _)">
> </dtml-if>
> </dtml-let>
> More over the comment attribute wasn't declared in the PortalContent
> class and I've added it
Actually there isn't supposed to be a comment attribute. The comment
is supposed to be added to the "review history". You may want to look
into getting that functionaliy back in there.
Shane