Batching in ZSQLMethod test is broken

Bug #143585 reported by Bug Importer on 2005-12-12
Affects Status Importance Assigned to Milestone

Bug Description

When using "Test" tab for ZSQLMethod which has some parameters
only first 20 results are shown correctly.
'(Next 20 results)' link is broken. It leads to page that says:

Error, exceptions.NameError: name 'param_name' is not defined
SQL used:
Could not render the query template!

This is because of not passing query parameters in the '(Next 20 results)' link. There is additional, unnecessary 'query' parameter in this link that is always empty:


Victor Safronovich (suvit) wrote :

the parameter 'query' is not empty, it equals to "''".

Maciej Wisniowski (pigletto) wrote :

Uploaded: ZSQLTestHotfix.tar.gz

I've found that changing two lines in file:

<a href="&dtml-URL;?query_start=&dtml-previous-sequence-start-number;&query=<dtml-var query url_quote missing=''>">
<a href="&dtml-URL;?query_start=&dtml-next-sequence-start-number;&query=<dtml-var query url_quote missing=''>">

<a href="&dtml-URL;<dtml-var sequence-query missing=''>query_start=&dtml-previous-sequence-start-number;">
<a href="&dtml-URL;<dtml-var sequence-query missing=''>query_start=&dtml-next-sequence-start-number;">

seems to solve this problem.

Victor Safronovich (suvit) wrote :

using missing='' is wrong, because it renders as "''", but missing="" renders as empty string ""

affects: zope2 → products.zsqlmethods
Changed in products.zsqlmethods:
status: New → Confirmed
Colin Watson (cjwatson) wrote :

The products.zsqlmethods project on Launchpad has been archived at the request of the Zope developers (see and If this bug is still relevant, please refile it at

Changed in products.zsqlmethods:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers