Package: zope2.7 Version: 2.7.5-1 Severity: normal
There's a bug which occurs when BOTH of the following conditions are met : - Create a ZSQL method of the SELECT type, with NO ARGUMENT. e.g. : SELECT * FROM mytable; - Have an SQL database (I use PostgreSQL) in which THERE ARE SOME DATAS which match the SQL SELECT query defined above. - Click on the Test tab for the ZSQL query, then on the submit button. The error is in the result rendering code, around line 337 of Shared/DC/ZRDB/DA.py Traceback : Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' The error seems to occur because the query has no parameter (argument) defined, then the rendering doesn't find the 'query' field. The error doesn't occur if there's no data which match the SELECT query, for example with an empty table it works fine. I wasn't able to exactly understand where to add an hidden and empty 'query' field to the rendered template to quickly fix the problem, so I can't send a patch. Sorry. hoping this helps bye Jerome Alet -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.4.27-2-686-smp Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) Versions of packages zope2.7 depends on: ii adduser 3.63 Add and remove users and groups ii debconf 1.4.48 Debian configuration management sy ii dpkg 1.10.27 Package maintenance system for Deb ii libc6 2.3.2.ds1-21 GNU C Library: Shared libraries an ii python2.3 2.3.5-2 An interactive high-level object-o ii python2.3-xml 0.8.4-1 XML tools for Python (2.3.x) -- debconf information: zope/upgrade/2.7: * zope/tips/2.7: * zope/tips/standalone_install: zope/instance_home/move: true * shared/zope/restart: end -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]