[z3] acquisition issue, do I have to report this bug?
Philipp von Weitershausen
philipp at weitershausen.de
Mon Nov 6 21:37:31 CET 2006
Hi Lucie,
just a note: this mailinglist is a low-traffic list about the Zope 3
base project. It's not really meant for technical questions. They would
probably be better directed to zope at zope.org.
Now, regarding your problem:
> I migrated a website running with Zope-2.8.6-py24/Plone2.1.2 to
> Zope-2.9.5-py24/Plone2.5.1
>
> In this website I am using a set of nodes. I have a node that has "alt"
> for its id and I access it like this:
> http://mywebsite/archive/alt
>
> This was working perfectly with Zope-2.8.6-py24/Plone2.1.2. But now,
> with Zope-2.9.5-py24/Plone2.5.1, it looks like acquisition is causing an
> issue and is mixing my "alt" node with the "alt" that you can find in an
> image tag (<img src="" alt="" />). When I change the id of the node to
> be "iso_alt", I have no more problem.
Well, what I can confirm is that OFS.Image.Image now has an 'alt'
attribute that it didn't have in Zope 2.8. So, on image objects I can
see how you may experience this problem.
The problem with this is a conceptual one. I don't think Acquisition
gives you a definitive contract for *always* being able to acquire the
thing you expect to acquire. If somethign else in the hierarchy happens
to provide the attribute, you will get that. That's just how it is.
Relying on acquisition that way is probably not a good idea, therefore.
It's common, though, but as you can see with this issue, it's can lead
to unforeseen problems.
> I was having the same problem with the node "end", that was being mixed
> with the "end" that is used for a Date (start/end). I renamed it to
> "ende" and had no more problem.
Yes, in the end you'll have to make your names as unique as possible. It
sucks, but that's how Zope 2 works :/
Philipp
More information about the z3
mailing list