[Zope-dev] Transparent Folder bug?

Randall F. Kern randy@spoke.net
Fri, 23 Mar 2001 16:47:53 -0800


I had that problem a while back but forgot to report it to Mr.
Transparent Folders (sorry...)

Anyway, this patch to TransparentFoldersPatch.py should fix you right
up:

    def _getattr(self, name):
        # This is the new ObjectManager.__getattr__().  If an object by
the
        # given ID is not found through the normal mechanisms, we
        # fall through to here and try to find the object in a
        # transparent folder.
        tpids =3D self._transparent_object_ids
        if tpids and not self._v_no_transparent and name[:3] !=3D '_p_'
and name !=3D '_is_transparent':
            # The attribute may be accessible through
            # transparent folders.
            try:

The important bit is adding the term "and name !=3D '_is_transparent': =
to
the if statement.

-Randy
 =20

> -----Original Message-----
> From: Andy McKay [mailto:andym@ActiveState.com]
> Sent: Friday, March 23, 2001 4:46 PM
> To: zope-dev@zope.org
> Subject: Re: [Zope-dev] Transparent Folder bug?
>=20
>=20
> Saying that I can now only reproduce this wierdness under certain
> circumstances. Id ignore this until I can find a solid=20
> example... Sorry
> --
>   Andy McKay.
>=20
>=20
> ----- Original Message -----
> From: "Andy McKay" <andym@ActiveState.com>
> To: <zope-dev@zope.org>
> Sent: Friday, March 23, 2001 4:27 PM
> Subject: [Zope-dev] Transparent Folder bug?
>=20
>=20
> > Am I imagining it or do I have a transparent folders bug?=20
> It would seem
> that
> > transparent folders adds an extra namespace to my objects=20
> and it searches
> > through sub folders eg:
> >
> > Folder X:
> >     Document Foo.
> >
> > In the root with transparent folders i can happily call=20
> <dtml-var Foo>
> when
> > I should not have this in my namespace. Without transparent=20
> folders I get
> a
> > KeyError (which I should). With I get X/Foo rendered even=20
> though X is not
> > transparent.
> >
> > My only caveat here is that every test with transparent=20
> folders is Zope
> 2.3,
> > where as without im using 2.1.6.
> >
> > Cheers.
> >
> > --
> >   Andy McKay.
> >
> >
> >
> >
> > _______________________________________________
> > Zope-Dev maillist  -  Zope-Dev@zope.org
> > http://lists.zope.org/mailman/listinfo/zope-dev
> > **  No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope )
> >
>=20
>=20
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -=20
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>=20