Ticket #4502 (closed Bug: fixed)
Wrong URL in advanced search results
| Reported by: | fschulze | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 2.1 |
| Component: | Templates/CSS | Version: | |
| Severity: | Keywords: | ||
| Cc: |
Description
It seems like the query part for the creation date in the url is wrong, because I get the following error when trying to click a link in the batching bar.
Error Type SyntaxError Error Value [DateTime('1970/02/01')]
This is probably just an issue with a wrong :record or something.
Change History
comment:2 Changed 6 years ago by alecm
Issue and patch filed with zope http://www.zope.org/Collectors/Zope/1871 ideas for workarounds gladly accepted.
comment:3 Changed 6 years ago by alecm
- Status changed from new to closed
- Resolution set to fixed
Went back to using _usage. The patch is now in zope svn but we probably won't have releases any time soon. The _usage thing isn't so bad because queryCatalog automatically converts them to proper record queries anyway.
Note: See
TracTickets for help on using
tickets.

Actually it's a pretty nasty problem. The Date query given as a record {'query':Date, 'range':'min'} actually requires a list as the 'query' parameter (pass it a date and you get "argument 2 to map() must support iteration" from DateIndex. So you need to pass created:record:list:date=date, which is perfectly valid and works as expected. However, ZTUtils.make_query is a bit naive and assumes that the elements of a record are simple types and ends up marshalling the list as a string. We could go back to using highly the deprecated created_usage style query I guess.