[Zope-CMF] Re: CMFSetup cookie crumbler setup still broken
tseaver at palladion.com
Thu Sep 22 19:29:59 EDT 2005
-----BEGIN PGP SIGNED MESSAGE-----
Jens Vagelpohl wrote:
> Just noticed another debilitating problem with the new cookie crumbler
> setup driven by CMFSetup in both SVN trunk and the 1.5 branch.
> Symptom: In a new CMFSetup-created site, no one can log in at all. Ever.
> Problem: The CookieCrumbler.__call__ method is being registered as
> before traverse hook wrongly.
> Basically, the new cookie crumbler CMFSetup stuff wants to use the
> machinery for instantiating CMF Tools. This machinery relies on the
> fact that CMF tool constructors can be invoked without any argument, to
> be more precise, without an ID passed in because all those tools have
> unique IDs that are set at class level. The CookieCrumbler does not.
> When the traversal hook registration happens in
> CookieCrumbler.manage_afterAdd the ID is needed, but calls to
> self.getId() now return an empty string.
> A workaround could be to set an ID at class level, just like CMF tools
> do. But I am uncomfortable with that because the cookie crumbler is not
> known to have a unique ID as other tools have.
I don't think its name matters; noboty is going to refer to it in a
template, for instance.
> Does anyone have a better suggestion?
We could '_setId' on the tool with the 'tool_id' attribute after
creating it, if the tool does not derive from CMFCore.utils.ImmutableId.
Tres Seaver +1 202-558-7113 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the Zope-CMF