From nobody Mon Sep 15 09:06:06 2003 Received: from unknown (HELO mail.python.org) (12.155.117.29) by zulu.avenirsolutions.com with SMTP; 15 Sep 2003 07:24:43 -0000 Received: from localhost.localdomain ([127.0.0.1] helo=mail.python.org) by mail.python.org with esmtp (Exim 4.22) id 19yois-00087E-0p; Mon, 15 Sep 2003 04:28:38 -0400 Received: from stateless1.tiscali.cz ([213.235.135.70] helo=mail.tiscali.cz) by mail.python.org with esmtp (Exim 4.22) id 19yoik-00080p-GP for zope@zope.org; Mon, 15 Sep 2003 04:28:30 -0400 Received: from gw (212.11.110.29) by mail.tiscali.cz (6.7.018) id 3F269CE000BFE5D7 for zope@zope.org; Mon, 15 Sep 2003 10:22:05 +0200 Message-ID: <3F269CE000BFE5D7@stateless1.tiscali.cz> (added by postmaster@mail.tiscali.cz) From: "Jaroslav Lukesh" <lukesh@seznam.cz> To: <zope@zope.org> Subject: Re: [Zope] VisualCMS - error in adding site Date: Mon, 15 Sep 2003 10:22:36 +0200 X-FeelingPriority: Normal X-Priority: 3 X-Mailer: Muj vlastni Mail klient 1.00 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: Quoted-Printable X-Spam-Status: OK (zopelist 0.000) X-BeenThere: zope@zope.org X-Mailman-Version: 2.1.2+ Precedence: list Reply-To: lsh@wo.cz List-Id: Users of the Z Object Publishing Environment <zope.zope.org> List-Unsubscribe: <http://mail.zope.org/mailman/listinfo/zope>, <mailto:zope-request@zope.org?subject=unsubscribe> List-Archive: <http://lists.zope.org/pipermail/zope> List-Post: <mailto:zope@zope.org> List-Help: <mailto:zope-request@zope.org?subject=help> List-Subscribe: <http://mail.zope.org/mailman/listinfo/zope>, <mailto:zope-request@zope.org?subject=subscribe> Sender: zope-bounces@zope.org Errors-To: zope-bounces@zope.org
Odes=EDlatel: Dieter Maurer <dieter@handshake.de>
Error Type: TALESError Error Value: exceptions.NameError on global name 'HUSER' is not defined in "", at line 2, column 1 =20 ...
Files\zope-web\lukesh251\lib\python\Products\AtlantisBlueCMS\CMSPage.py,
line 338, in browserType
Look at line 338 of "CMSPage.py". It references undefined "HUSER". Fix it.
I was make little data mining about HUSER. It is same code (with differen= t name)as User agent sniffer from ZopeLabs tip at www.zopelabs.com\cookbook\990728167\, but here are no note about "HUSER" too. So I think that it is undocumented system call (see to date of this tip), but it seems that no-no.: Re: Improvements by ruckc - 2001-07-17=20 I modified it for versioning in MSIE, ms3, ms4, ms5, ms6. Sorry for the lack of formatting. def whichBrowser(self, ident): if ( (string.find(ident, 'MSIE') =3D=3D -1) and (string.find(ident, 'Mozilla') >=3D 0 ) ): if ( (string.find(ident, 'Gecko') > -1 )) : ident =3D 'nn6' else: ident =3D 'nn4' elif (string.find(ident, 'MSIE') >=3D 0): ident =3D 'ms' thestr=3Dint(HUSER[ind+4] + HUSER[ind+5]) if(thestr >=3D 3): ver =3D 3 elif(thestr >=3D 4): ver =3D 4 elif(thestr >=3D 5): ver =3D 5 elif(thestr >=3D 6): ver =3D 6 if(ver) ident =3D ident+str(ver) else: ident =3D 'unknown' return ident I was make little tweak: #thestr=3Dint(HUSER[ind+4] + HUSER[ind+5]) thestr=3D4 It works in Zope, but browser (MSIE4) give me JS errors that makes pages not usable.=20 Does original code for somebody works?
Upgrade to Zope 2.6.2 as soon as you can. Tracebacks (for ZPT, but not DTML) will become much more readable.
I have lot of changes in sources of my 2.5.1 to handle correctly windows-1250 codepage at all situations. Some code is taken from Zope 2.6= .2 (STX handling + some mods), so upgrade would be really painfull.=20 Regards, JL. _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
participants (1)
-
lukesh@seznam.cz