creating a basic Z Search Interface form from the ZMI with Zope defaults creates error...
Hi I've just created a simple Z Search Interface form from the root of a site. It's created a results page. The form lists all the searchable fields, however when I do a simple search of my catalog within the 'Title' field..or any other field I get this error message...I know what the error means but cannot work out why there should be text and an integer being posted through when all I have done is search on a text field!! Thanks (Zope 2.10.5-final, python 2.4.3, linux2) Traceback (innermost last): Module ZPublisher.Publish, line 119, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 42, in call_object Module Shared.DC.Scripts.Bindings, line 313, in __call__ Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec Module Products.PageTemplates.ZopePageTemplate, line 330, in _exec Module Products.PageTemplates.ZopePageTemplate, line 426, in pt_render Module Products.CacheSetup.patch_cmf, line 74, in PT_pt_render Module Products.CacheSetup.patch_utils, line 9, in call_pattern Module Products.PageTemplates.PageTemplate, line 89, in pt_render Module zope.pagetemplate.pagetemplate, line 117, in pt_render Module zope.tal.talinterpreter, line 271, in __call__ Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 586, in do_setLocal_tal Module zope.tales.tales, line 696, in evaluate Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__ - __traceback_info__: modules['ZTUtils'].Batch(results, size=20, start=start) Module PythonExpr, line 1, in <expression> Module ZTUtils.Zope, line 149, in __init__ Module ZTUtils.Batch, line 65, in __init__ TypeError: cannot concatenate 'str' and 'int' objects michael
The line #65 in ZTUtils.Batch, start = start + 1, suggest that your 'start' argument for Batch is a string, when it should be an integer. Check it. On Wed, Sep 10, 2008 at 8:24 PM, michael nt milne <michael.milne@gmail.com> wrote:
Hi
I've just created a simple Z Search Interface form from the root of a site. It's created a results page. The form lists all the searchable fields, however when I do a simple search of my catalog within the 'Title' field..or any other field I get this error message...I know what the error means but cannot work out why there should be text and an integer being posted through when all I have done is search on a text field!!
Thanks
(Zope 2.10.5-final, python 2.4.3, linux2)
Traceback (innermost last): Module ZPublisher.Publish, line 119, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 42, in call_object Module Shared.DC.Scripts.Bindings, line 313, in __call__ Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec Module Products.PageTemplates.ZopePageTemplate, line 330, in _exec Module Products.PageTemplates.ZopePageTemplate, line 426, in pt_render Module Products.CacheSetup.patch_cmf, line 74, in PT_pt_render Module Products.CacheSetup.patch_utils, line 9, in call_pattern Module Products.PageTemplates.PageTemplate, line 89, in pt_render Module zope.pagetemplate.pagetemplate, line 117, in pt_render Module zope.tal.talinterpreter, line 271, in __call__ Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 586, in do_setLocal_tal Module zope.tales.tales, line 696, in evaluate Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__ - __traceback_info__: modules['ZTUtils'].Batch(results, size=20, start=start) Module PythonExpr, line 1, in <expression> Module ZTUtils.Zope, line 149, in __init__ Module ZTUtils.Batch, line 65, in __init__ TypeError: cannot concatenate 'str' and 'int' objects
michael _______________________________________________ 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 )
-- Israel Saeta Pérez http://dukebody.com
Thanks for the response I'm using forms generated by Zope through Z Search Method and am not entering a start argument, simply entering text into a field and pressing submit... michael On Thu, Sep 11, 2008 at 7:30 AM, Israel Saeta Pérez <dukebody@gmail.com> wrote:
The line #65 in ZTUtils.Batch,
start = start + 1,
suggest that your 'start' argument for Batch is a string, when it should be an integer. Check it.
On Wed, Sep 10, 2008 at 8:24 PM, michael nt milne <michael.milne@gmail.com> wrote:
Hi
I've just created a simple Z Search Interface form from the root of a site. It's created a results page. The form lists all the searchable fields, however when I do a simple search of my catalog within the 'Title' field..or any other field I get this error message...I know what the error means but cannot work out why there should be text and an integer being posted through when all I have done is search on a text field!!
Thanks
(Zope 2.10.5-final, python 2.4.3, linux2)
Traceback (innermost last): Module ZPublisher.Publish, line 119, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 42, in call_object Module Shared.DC.Scripts.Bindings, line 313, in __call__ Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec Module Products.PageTemplates.ZopePageTemplate, line 330, in _exec Module Products.PageTemplates.ZopePageTemplate, line 426, in pt_render Module Products.CacheSetup.patch_cmf, line 74, in PT_pt_render Module Products.CacheSetup.patch_utils, line 9, in call_pattern Module Products.PageTemplates.PageTemplate, line 89, in pt_render Module zope.pagetemplate.pagetemplate, line 117, in pt_render Module zope.tal.talinterpreter, line 271, in __call__ Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 586, in do_setLocal_tal Module zope.tales.tales, line 696, in evaluate Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__ - __traceback_info__: modules['ZTUtils'].Batch(results, size=20, start=start) Module PythonExpr, line 1, in <expression> Module ZTUtils.Zope, line 149, in __init__ Module ZTUtils.Batch, line 65, in __init__ TypeError: cannot concatenate 'str' and 'int' objects
michael _______________________________________________ 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 )
-- Israel Saeta Pérez http://dukebody.com _______________________________________________ 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 )
This is the code from the start of the generated Zope form. I'd expect it to work since it generated it itself! :-) <body tal:define="results here/portal_catalog; start request/start|python:0; batch python:modules['ZTUtils'].Batch(results, size=20, start=start); previous python:batch.previous; next python:batch.next"> <p> <a tal:condition="previous" tal:attributes="href string:${request/URL0}?start:int=${previous/first}" href="previous_url">previous <span tal:replace="previous/length">20</span> results</a> <a tal:condition="next" tal:attributes="href string:${request/URL0}?start:int=${next/first}" href="next_url">next <span tal:replace="next/length">20</span> results</a> </p> michael On Thu, Sep 11, 2008 at 12:37 PM, michael nt milne <michael.milne@gmail.com> wrote:
Thanks for the response
I'm using forms generated by Zope through Z Search Method and am not entering a start argument, simply entering text into a field and pressing submit...
michael
On Thu, Sep 11, 2008 at 7:30 AM, Israel Saeta Pérez <dukebody@gmail.com> wrote:
The line #65 in ZTUtils.Batch,
start = start + 1,
suggest that your 'start' argument for Batch is a string, when it should be an integer. Check it.
On Wed, Sep 10, 2008 at 8:24 PM, michael nt milne <michael.milne@gmail.com> wrote:
Hi
I've just created a simple Z Search Interface form from the root of a site. It's created a results page. The form lists all the searchable fields, however when I do a simple search of my catalog within the 'Title' field..or any other field I get this error message...I know what the error means but cannot work out why there should be text and an integer being posted through when all I have done is search on a text field!!
Thanks
(Zope 2.10.5-final, python 2.4.3, linux2)
Traceback (innermost last): Module ZPublisher.Publish, line 119, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 42, in call_object Module Shared.DC.Scripts.Bindings, line 313, in __call__ Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec Module Products.PageTemplates.ZopePageTemplate, line 330, in _exec Module Products.PageTemplates.ZopePageTemplate, line 426, in pt_render Module Products.CacheSetup.patch_cmf, line 74, in PT_pt_render Module Products.CacheSetup.patch_utils, line 9, in call_pattern Module Products.PageTemplates.PageTemplate, line 89, in pt_render Module zope.pagetemplate.pagetemplate, line 117, in pt_render Module zope.tal.talinterpreter, line 271, in __call__ Module zope.tal.talinterpreter, line 346, in interpret Module zope.tal.talinterpreter, line 586, in do_setLocal_tal Module zope.tales.tales, line 696, in evaluate Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__ - __traceback_info__: modules['ZTUtils'].Batch(results, size=20, start=start) Module PythonExpr, line 1, in <expression> Module ZTUtils.Zope, line 149, in __init__ Module ZTUtils.Batch, line 65, in __init__ TypeError: cannot concatenate 'str' and 'int' objects
michael _______________________________________________ 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 )
-- Israel Saeta Pérez http://dukebody.com _______________________________________________ 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 (2)
-
Israel Saeta Pérez -
michael nt milne