[Zope-CMF] Subtle bug in Portal.py (with fix :-)

Chris Withers chrisw@nipltd.com
Mon, 4 Jun 2001 13:43:58 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_0B73_01C0ECFC.680362E0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hi,

There's a nasty bug in Portal.py caused by the order of inheritence in
Python when multiple classes are involved, meaning that although CMFSite
inherits from DefaultDublinCoreImpl, the constructor for that class is never
called.

The attached patch fixes the problem, although any CMF instances already
around will need fixing :-(

cheers,

Chris

------=_NextPart_000_0B73_01C0ECFC.680362E0
Content-Type: application/octet-stream;
	name="Portal.py.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="Portal.py.patch"

--- Portal.py.original	Thu May 17 14:58:14 2001
+++ Portal.py	Mon Jun 04 13:40:20 2001
@@ -228,6 +228,10 @@
                        , ( 'View',  ( 'isEffective', ) )
                        )
=20
+    def __init__(self,id):
+        DefaultDublinCoreImpl.__init__(self)
+        PortalObjectBase.__init__(self,id=3Did)
+       =20
     def isEffective( self, date ):
         """
             Override DefaultDublinCoreImpl's test, since we are always =
viewable.

------=_NextPart_000_0B73_01C0ECFC.680362E0--