Wednesday 01 July 2009 5:03:11 am
Here's a quick way to reproduce the problem I have with sorting.. If anyone can confirm this, I'll file it in the issue tracker.
In default ezwebin - installation, create a few Product - class objects under for example Products/Software - node.
Use for example the following names for the products (or something similar)
aaaaaa
aa-bb
aa-cc
ba-ab
bbbbb
ccccccccc
ffffffffffffffff
ff gg
gaga
gg ff
gggggg
OS Type I Test-Product
The OS Type I is one of the default objects.. Now if you use the following ezfind fetch:
{def $srch=fetch('ezfind', 'search', hash(
'query', '',
'limit', 20,
'subtree_array', array(70),
'class_id', 'product',
'sort_by', hash('product/name', 'asc')
))}
{foreach $srch.SearchResult as $s}
{$s.name}<br />
{/foreach}
70 is the node id for products/software in default ezwebin install.
What you end up with is a list of products which are certainly not ordered correctly.. What I get is this:
aaaaaa
ba-ab
aa-bb
bbbbb
aa-cc
ccccccccc
ffffffffffffffff
gaga
ff gg
gg ff
gggggg
Test-Product OS Type I What you will get may vary.. It seems there's absolutely no logic to the sorting. Sometimes names with dashes and or whitespaces get ordered correctly and sometimes the get ordered according to the string after the dash or whitespace.. Can anyone confirm this as a bug?
|