[Zope] I've got those ZCatalog sort_on blues ...

Darran Edmundson dee124@rsphy1.anu.edu.au
Wed, 23 Feb 2000 22:17:51 +1100 (EST)


It's getting late, the concrete wall beside me, formerly white,
is now stained with the mushy red-purple pulp of my brain. 
I've invoked every diety I can think of and, on behalf of
Canadians everywhere, apologized on usenet for both William 
Shatner and Bryan Adams, but to no avail ...

Some of my ZCatalog searches are not working with the sort_on 
keyword.  Consider:

<dtml-call "REQUEST.set('semlist',
    seminarCatalog(Date=ZopeTime(),Date_usage='range:min',sort_on='Date'))">

and

<dtml-call "REQUEST.set('publist',
    publicationCatalog(Authors='Kivshar',sort_on='Year'))">

The first works, the second only returns entries if I remove the
sort_on='Year' parameter.  So what about this second case:

1) entries exist because I get them if I remove the sort_on.

2) Year is a valid index (integer type) and meta_table entry.  I 
   am pretty sure it is a FieldIndex because I create it 
   programatically:

   <dtml-with "publicationCatalog">
     <dtml-call "manage_addIndex('Year','FieldIndex',REQUEST,RESPONSE,URL1)">
   </dtml-with>

Right now much of my site is buggered because I can't sort the
results of catalog searches.  Any suggestions are appreciated.

Cheers,
Darran.