Andreas Jung, on 2009-06-23:
> We are currently migration from Zope 2.8/CMF 1.X to Zope 2.11/CMF 2.1.
> I have a minimal base profile and two almost identical extension
> profiles for
> product A and B (both containing toolset.xml, skins.xml and
> The setup code is almost identical with the one from
> So what's happening:
> - creating a CMF site with the base profile + extension profile for A
> works as expected
> - creating a CMF site with the base profile + extension profile for B
> works but the setuphandler
> code of the base profile is executed twice (triggered through the
> installation of the extension
> profile for B)
> - creating a CMF site with the base profile + both extension profiles
> for A + B fails
> with a 'Exisiting registration...' error
> General question: what might be the reason for extension profile B to
> trigger the reinstallation
> of the base profile (and its setuphandler)?
You say here that the base profile including its setuphandler is
applied twice. Above you said that only the setuphandler is run
twice. Which is it?
The setuphandler of the base profile should have some code like this
to make sure it is executed only at the moment the base profile itself
# Only run step if a flag file is present
if context.readDataFile(flagfile_for_base_profile.txt') is None:
... Do something useful here...
See for example
But if a check like that is missing, I would expect this setuphandler
to be executed when applying profile A as well, which is not
happening. Perhaps there is a check that somehow treats profile A and
I would say go in with a pdb and see if the traceback tells you
anything about why the setuphandler gets executed again.
Maurits van Rees | http://maurits.vanrees.org/
Work | http://zestsoftware.nl/
"This is your day, don't let them take it away." [Barlow Girl]
Zope-CMF maillist - Zope-CMF@lists.zope.org
See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests