Just ran across this after enabling the "Sort Results" block with the "Filter Results" block.

The Facets block properly adds or removes items from the query string when used alone, and works great.
The Sort block also works fine on its own.

However, when both blocks are combined, I'm running into a weird issue, and I'm not sure if it's intended, or a bug.

When first selecting facets to filter results, and THEN sorting results, the query strings are properly respected, such as: /search/luceneapi_node/omega?lucenesort[title_sort]=asc&uid[1]=1

BUT, if you already have a Sort method selected, and are at the current URL: search/luceneapi_node/omega?lucenesort[created]=asc&uid[1]=1 if you attempt to now add another facet, the following link is present: search/luceneapi_node/omega?uid[1]=1&type[blog]=blog, and removes the currently selected sort method.

CommentFileSizeAuthor
#3 luceneapi-664440-3.patch3.13 KBcpliakas

Comments

cpliakas’s picture

Component: Code » User interface
Issue tags: +6.x-2.0

Hi himerus.

I think that this is a usability bug. If you select a sort through the block, you are correct in that it should persist after selecting additional facets. Flagging for the stable 2.0 release, which is the next expected release.

Great job picking this up,
Chris

cpliakas’s picture

Status: Fixed » Active

Hi himerus.

On further review, it looks like the sort options persist when caching is NOT enabled. The logic is working, it is just happening in the wrong location as the sort data should persist with caching enabled as well.

Thanks,
Chris

cpliakas’s picture

Status: Active » Reviewed & tested by the community
StatusFileSize
new3.13 KB

The attached patch fixes the issue.

cpliakas’s picture

Status: Reviewed & tested by the community » Fixed

Fixed in commit #305592.

himerus’s picture

Status: Active » Fixed

You rock, Chris!

Status: Fixed » Closed (fixed)
Issue tags: -6.x-2.0

Automatically closed -- issue fixed for 2 weeks with no activity.