[Zope-CMF] something wrong with portal_metadata tool
marc lindahl
marc@bowery.com
Mon, 21 May 2001 00:21:19 -0400
I think I fixed it.... of course it could use some more testing. In
MetadataTool.py, change the following function:
def updateElementPolicy( self
, element
, content_type
, is_required
, supply_default
, default_value
, enforce_vocabulary
, allowed_vocabulary
, REQUEST=None
):
"""
Update a policy for one of our elements ('content_type'
will be '<default>' when we edit the default).
"""
if content_type == '<default>':
content_type = None
spec = self.getElementSpec( element )
policy = spec.getPolicy( content_type )
policy.edit( is_required
, supply_default
, default_value
, enforce_vocabulary
, allowed_vocabulary
)
spec.policies._p_changed=1 # added 2001/05/20 MSL tracker#274
if REQUEST is not None:
REQUEST[ 'RESPONSE' ].redirect( self.absolute_url()
+ '/elementPoliciesForm'
+ '?element=' + element
+ '&manage_tabs_message=Policy+updated.'
)
> From: seb bacon <seb@jamkit.com>
> Date: Thu, 17 May 2001 10:14:59 +0100
> To: marc lindahl <marc@bowery.com>
> Cc: zope-cmf@zope.org
> Subject: Re: [Zope-CMF] something wrong with portal_metadata tool
>
> * marc lindahl <marc@bowery.com> [010516 21:24]:
>> I noticed that in the portal_metadata tool 'elements' tab, if you have only
>> a <default> policy, it get's "forgotten" - at some point goes away,
>> disappears. If you have some policies for named content types, none of them
>> disappear. It's independant for the different Elements. Bug?
>
> I've noticed that, too - one for the collector - could you do it?
>
> seb
>