Closed Bug 532511 Opened 15 years ago Closed 15 years ago

Knowledge Base results missing after first page

Categories

(support.mozilla.org :: Search, defect)

defect
Not set
blocker

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: stephend, Assigned: jsocol)

References

()

Details

(Whiteboard: sumo_only search)

Attachments

(2 files)

STR:

1. Load http://support-stage.mozilla.org/search.php?q=Tastaturk%C3%BCrzel&lang=de&tags=&where=d&locale=de&advanced=1 (might need to be logged in)
2. Click "Next" or "2"

Expected Results:

Should go to the next page, if there are results; if not, it shouldn't show the pagination element at all

Actual Results:

"2" shows up but doesn't go anywhere
The result count says 15, which should continue to page 2.
Assignee: nobody → james
Whiteboard: sumo_only search
Target Milestone: --- → 1.5
The offset and results/page are already accounted for in the SphinxLib constructor, making this line unnecessary.
Attachment #415740 - Flags: review?(morgamic)
Blocks: 532232
Severity: major → blocker
Attachment #415740 - Flags: review?(morgamic) → review+
Comment on attachment 415740 [details] [diff] [review]
remove the duplicate slicing

This makes sense to me.  Redundant code = no!
r57193
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Summary: Pagination element shows up but doesn't have associated results → Knowledge Base results missing after first page
Looks like simple search pagination is broken.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
The code that did the slicing was necessary for simple searches, but not for advanced document searches. I tested this with simple searches with where=f,d,all, and advanced with where=f,d. Advanced does not support where=all so it's not a meaningful case.
Attachment #415785 - Flags: review?(morgamic)
Comment on attachment 415785 [details] [diff] [review]
array_slicing on simple searches

I think could just replace that new <if> condition with:
---
if ($search_parameters['where'] == SEARCH_WHERE_ALL)
---
Seems logically equivalent, right?
(In reply to comment #9)
> (From update of attachment 415785 [details] [diff] [review])
> I think could just replace that new <if> condition with:
> ---
> if ($search_parameters['where'] == SEARCH_WHERE_ALL)
> ---
> Seems logically equivalent, right?

Just tried that and it didn't work for me. I'm wary of treating where=all and advanced=1 as completely exclusive possibilities. That's a dangerous assumption.
Odd. They should be equivalent, because in validation where=all is treated as where=d for advanced search. See these lines:
---
$where_array = array(SEARCH_WHERE_D, SEARCH_WHERE_F);
if (!$is_advanced) $where_array[] = SEARCH_WHERE_ALL;
if (!in_array($search_parameters['where'], $where_array))
    if ($is_advanced) $search_parameters['where'] = SEARCH_WHERE_D;
    else              $search_parameters['where'] = SEARCH_WHERE_ALL;
---
Unfortunately I won't have time to look into this until later tomorrow. Anyway, if the patch works, that's fine.
Comment on attachment 415785 [details] [diff] [review]
array_slicing on simple searches

This is to get the correct # of results?  If so, seems to work for me.
Attachment #415785 - Flags: review?(morgamic) → review+
r57215.

This should be returning correct results per page in both simple and advanced search.
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
Verified, FIXED.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: