Florent Guillaume wrote:
It seems that an extension profile can't add actions to an action provide in CMF 1.6. Or, rather, if you do it all previous actions are erased.

The actions exportimport code has:

    def _initProviders(self, node):
            # delete any actions that are auto-created
            provider = getToolByName(self.context, provider_id)
            num_actions = len(provider.listActions())
            if num_actions:

What is this for? It's harmful.

ah, whoops. this is mine. it's meant to work around the fact that the tools have their action sets hard-coded when they are instantiated; if this is not there, the actions would be duplicated when the actions are loaded from the setup profile.

Also, it seems actions inside action providers aren't purged correctly.

the code above is an attempt to do just that.

Can someone shed light on what the code tries to do? Can I use "newstyle" action profiles in CMF 1.6?

that's the idea. i just didn't account for extension profiles when i wrote the action purging code. does it make sense to skip the action purge when it is an extension profile being run? or is there a more sensible way to handle this?


Zope-CMF maillist  -  Zope-CMF@lists.zope.org

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to