[Zope] Zope-2.6 acquisition problem

Thierry Florac thierry.florac@onf.fr
29 Nov 2002 08:48:18 +0100


  Hi,


On Thu, 2002-11-28 at 17:18, Oliver Bleutgen wrote:
> > I created several new "folder like" products with new properties and
> > methods, which hinerit from SimpleItem, PropertyManager and
> > ObjectManager.
> > My problem is simple :
> >  1. I put an image in a folder, with name "logo" => OK
> >  2. I put a different image in a subfolder, with name "toto" => OK
> >  3. I rename the second image to "logo" => ERROR: when downloading the
> > image, I get the image from the parent folder !!!
> >  4. I rename the second image to "toto" => OK, I retrieve the original
> > image...
> > 
> > I think that this is in complete contradiction with Zope acquisition
> > principles, so I suppose that I missed something...
> 
> How do you "show" the image when this happens, directly via it's url, an 
> image-tag, or <dtml-var logo>?

At first, just in the ZMI !!
In fact, I think I solved the problem, but I'm not sure of any good
explanation :
 - first, I added 'Acquisition.Implicit' as the first inherited class of
my custom object manager (but I think it's already done throught
ObjectManager inheritance),
 - second, I removed my first image from an HTTP cache manager with
which it was associated.

After this, I packed the database, restarted Zope, and now everything
seems right, but several questions remain: how does HTTP cache managers
handle acquition ? In fact, I just use <img src="logo"> in my HTML
pages; if only the first image is associated with the cache manager, why
is the first image retrieved when it's the second one (not associated
with the cache) which is first in the acquisition path ??

If this behaviour is "normal", I don't understand when and how cache
managers should be used...

Thanks,

  Thierry