Coroico / AdvSearch

Dynamic content search add-on for MODx Revolution that supports results highlighting, faceted search and search in custom packages
21 stars 14 forks source link

Array of parameters is 'lost' in paging #21

Closed AlexChebanenko closed 12 years ago

AlexChebanenko commented 12 years ago

Excuse me, because my english is not good. I'm going to organize search with multiple select of TV parameters. For example, i choose 23-Inch monitors, 19-Inch monitors, 27-Inch monitors (not the others). I tried to adopt the sample 1 of faceted search (http://www.revo.wangba.fr/faceted-search-1.html), but I'm having a trouble. Searching is okay, i got the first page of results, I have a link like this (pls look at diag[] variable):

search.html?id=288847&asId=as0&ctg=all&diag[]=1920+%D1%85+1080&diag[]=1366+%D1%85+768&sub=Search

When i'm clicking to next page, the search is breaking (I got a link below).

search.html?id=288847&asId=as0&ctg=all&diag=&sub=Search&offset=10 That's bad for me :( If I'm fixing this link manually by appending the first link with &offset, the results are shown OK. In the sample of faceted search we can see that elements of array get indexes (0,1,2,..) when clicking "next", but I'm just losing an array. What's wrong with my search? This bug can be my fault. Looking forward for answer. Thank you for attention.

P.S.: You have the same bug on the demo-site http://www.revo.wangba.fr (AJAX Faceted Search-1 and -3). Maybe, this is a problem with MakeUrl?

Coroico commented 12 years ago

You have the same bug on the demo-site http://www.revo.wangba.fr (AJAX Faceted Search-1 and -3). Thanks for this feedback. This issue is now fixed. See the issue #22. The problem was inside the js file (wrong http request variable name used).

Do you use the ajax mode or not ?

AlexChebanenko commented 12 years ago

I got this bug in both AJAX and non-AJAX modes. My version of AdvSearch is 1.0.0-pl2 ModX package.

Coroico commented 12 years ago

Could you send me by email an url of your site with the bug. I can't reproduce this bug on my demo site with the non-ajax mode.

The demo http://www.revo.wangba.fr/faceted-search-1.html works correctly.