Hi,
when I want to use the Z Search Interface Product, I have an error.
This this the traceback
2020-10-12 17:29:21 ERROR [waitress:357][waitress] Exception while serving /www.fam-europe.fr/Posts/manage_addProduct/ZSQLMethods/manage_addZSearch
Traceback (most recent call last):
File "/home/zope/zope4/Zope-4.3/eggs/waitress-1.4.3-py3.7.egg/waitress/channel.py", line 349, in service
task.service()
File "/home/zope/zope4/Zope-4.3/eggs/waitress-1.4.3-py3.7.egg/waitress/task.py", line 169, in service
self.execute()
File "/home/zope/zope4/Zope-4.3/eggs/waitress-1.4.3-py3.7.egg/waitress/task.py", line 439, in execute
app_iter = self.channel.server.application(environ, start_response)
File "/home/zope/zope4/Zope-4.3/src/ZPublisher/httpexceptions.py", line 30, in call
return self.application(environ, start_response)
File "/home/zope/zope4/Zope-4.3/eggs/Paste-3.3.0-py3.7.egg/paste/translogger.py", line 69, in call
return self.application(environ, replacement_start_response)
File "/home/zope/zope4/Zope-4.3/src/ZPublisher/WSGIPublisher.py", line 359, in publish_module
response = _publish(request, new_mod_info)
File "/home/zope/zope4/Zope-4.3/src/ZPublisher/WSGIPublisher.py", line 262, in publish
bind=1)
File "/home/zope/zope4/Zope-4.3/src/ZPublisher/mapply.py", line 85, in mapply
return debug(object, args, context)
File "/home/zope/zope4/Zope-4.3/src/ZPublisher/WSGIPublisher.py", line 63, in call_object
return obj(*args)
File "/home/zope/zope4/Zope-4.3/lib/python3.7/site-packages/Shared/DC/ZRDB/Search.py", line 39, in manage_addZSearch
raise ValueError('No searchable objects were selected')
ValueError: No searchable objects were selected
ZSearchInterface creates a (user) interface specialized for a "searchable object". Concrete: it asks the searchable object for its input parameters and its result fields and creates a form for the input parameters and a view for the result parameters.
The error message above indicates that the create has not seen the "searchable object" information -- either because you did not specify it or because the information was lost due to some bug.
Install Products.SiteErrorLog (if this is not already installed); create an error_log object (from the above product; if not already present). The error_log gives you detailed information about requests which failed due to an exception. In the case above, could could inspect the request to check whether the "searchable object" information is present or not.
Ideally, the front-end would only allow to submit forms, which produce a valid result, ie do not allow to submit a form which lacks some required values.
Update
Looks like you can also select a ZCatalog as searchable objects!
The ZSearchInterface supports only a limited set of "searchable object" types (when I remember right ZSQLMethods and ZCatalog objects). The selection list should enumerate all such objects the ZSearchInterface sees in the context of its invocation (including at least the invocation Folder). Should there be such a searchable object and the list is nevertheless empty, you see a bug.