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

Better error reporting for sphinx

    Details

    • Type: Improvement
    • Status: Unverified Fix
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.0-dev
    • Fix Version/s: 3.1.0-a1
    • Component/s: Search
    • Labels:
      None

      Description

      If searchd is not running or cannot be connected to due to misconfiguration, searching for anything produces a "no search results" message indistinguishable from searching for keywords which do not occur anywhere.

      I suggest the following:

      1. Keep track of any errors retrieved from sphinx.
      2. Log errors to error log.
      3. If the user is logged in and has admin privileges, show them the actual error instead of "no search results".
      4. If user is not an admin tell them there was a problem searching and more information was written to the error log.

        Issue Links

          Activity

          Hide
          Oleg Oleg [X] (Inactive) added a comment -

          Reopening as the user is not told that search failed with the first PR merged.

          (01:22:12) nx-: that is an improvement on the current situation, however user is still not told that search failed
          (01:22:59) Dhruv: yes from what you suggested, user and admin should have different messages when search fails?
          (01:23:23) nx-: at the very least the message should indicate that search failed
          (01:23:41) nx-: you can say that search failed and error information is logged, for both admins and non-admins
          (01:24:03) nx-: this will be sufficiently good in my opinion
          (01:24:11) nx-: for bonus points, show the actual error to admins
          (01:24:21) Dhruv: oh that won't be a problem, just a trigger_error when error is logged would do I suppose?
          (01:24:41) Dhruv: yes this can be done.
          (01:25:24) nx-: trigger_error sounds fine

          Show
          Oleg Oleg [X] (Inactive) added a comment - Reopening as the user is not told that search failed with the first PR merged. (01:22:12) nx-: that is an improvement on the current situation, however user is still not told that search failed (01:22:59) Dhruv: yes from what you suggested, user and admin should have different messages when search fails? (01:23:23) nx-: at the very least the message should indicate that search failed (01:23:41) nx-: you can say that search failed and error information is logged, for both admins and non-admins (01:24:03) nx-: this will be sufficiently good in my opinion (01:24:11) nx-: for bonus points, show the actual error to admins (01:24:21) Dhruv: oh that won't be a problem, just a trigger_error when error is logged would do I suppose? (01:24:41) Dhruv: yes this can be done. (01:25:24) nx-: trigger_error sounds fine
          Hide
          dhruv.goel92 Dhruv Goel added a comment -

          https://github.com/phpbb/phpbb3/pull/947 fixes a bug in the error reporting

          Show
          dhruv.goel92 Dhruv Goel added a comment - https://github.com/phpbb/phpbb3/pull/947 fixes a bug in the error reporting
          Hide
          dhruv.goel92 Dhruv Goel added a comment -

          Final fix in this issue for language key - https://github.com/phpbb/phpbb3/pull/954 as suggested by oleg.

          Show
          dhruv.goel92 Dhruv Goel added a comment - Final fix in this issue for language key - https://github.com/phpbb/phpbb3/pull/954 as suggested by oleg.

            People

            • Assignee:
              bantu Andreas Fischer
              Reporter:
              Oleg Oleg [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development