Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-10532

Out of range $start causes a page with no search results but with pagination

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.9, 3.0.10-RC1, 3.0.10-RC2
    • Fix Version/s: 3.0.11-RC1
    • Component/s: Search
    • Labels:
      None

      Description

      Search system seems to be not handling max $start value for certain search types. Namely, if search_id is set and $start is out of range, user gets a page with no search results but with pagination which depends on the $start value.
      Confirmed for search_id=unanswered, search_id=newposts, search_id=unreadposts at least.
      Example:

      _http://www.phpbb.com/community/search.php?search_id=newposts&start=9999999

      (see the screenshot).

      Reported by RMcGirr83, clarified by Erik Frèrejean.

        Activity

        Show
        rxu Ruslan Uzdenov added a comment - Possible approach to fix: https://github.com/rxu/phpbb3/compare/develop-olympus...ticket%2F10532
        Hide
        bantu Andreas Fischer added a comment -

        We only need to do that if we are on page > 1 and there are no search results?

        That sounds similar to what I had in mind:

        while ($row = ...)
        {
        }
        else if (not first page)
        {
          redirect temporary to first page
        }
        

        Show
        bantu Andreas Fischer added a comment - We only need to do that if we are on page > 1 and there are no search results? That sounds similar to what I had in mind: while ($row = ...) { } else if (not first page) { redirect temporary to first page }
        Hide
        rxu Ruslan Uzdenov added a comment -

        The patch is doing similar thing pretty much. Just look at the code deeper

        Show
        rxu Ruslan Uzdenov added a comment - The patch is doing similar thing pretty much. Just look at the code deeper
        Hide
        bantu Andreas Fischer added a comment -

        Haven't looked at the code at all yet.

        Show
        bantu Andreas Fischer added a comment - Haven't looked at the code at all yet.
        Hide
        dhruv.goel92 Dhruv Goel added a comment -

        This issue will fix the same thing -> http://tracker.phpbb.com/browse/PHPBB3-11179

        Show
        dhruv.goel92 Dhruv Goel added a comment - This issue will fix the same thing -> http://tracker.phpbb.com/browse/PHPBB3-11179

          People

          • Assignee:
            rxu Ruslan Uzdenov
            Reporter:
            rxu Ruslan Uzdenov
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development