Bug 11951 - OPAC search suggestions template error
Summary: OPAC search suggestions template error
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-17 13:17 UTC by Nicole C. Engard
Modified: 2015-06-04 23:30 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 11951 - OPAC search suggestions template error (1.52 KB, patch)
2014-03-17 13:58 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 11951 - OPAC search suggestions template error (1.56 KB, patch)
2014-03-17 15:45 UTC, Alex Sassmannshausen
Details | Diff | Splinter Review
[PASSED QA] Bug 11951 - OPAC search suggestions template error (1.70 KB, patch)
2014-03-18 07:28 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2014-03-17 13:17:23 UTC
You'll need to see this video - and probably pause it to see what I mean: http://screencast.com/t/enK0sx5AG 

When you do a search that gets no results you see a message for a split second that says something like 'not what you were looking for. check for suggestions' with a link in it.  Either that doesn't belong there or it should show up for longer than it does - not sure where it goes.
Comment 1 Nicole C. Engard 2014-03-17 13:18:28 UTC
Nevermind, I caught it - it goes here: http://kohavm/cgi-bin/koha/svc/suggestion?render=standalone&q=32298

Which is an error page for me in Master and on 3.14.3:

Software error:

Template process failed: file error - cssinclude: not found at /home/nengard/kohaclone/C4/Templates.pm line 132.
Comment 2 Owen Leonard 2014-03-17 13:58:24 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2014-03-17 14:02:08 UTC
(In reply to Nicole C. Engard from comment #0)
> Either that doesn't belong there or it
> should show up for longer than it does - not sure where it goes.

The message isn't really meant to be seen if the user has JavaScript enabled, that's why it disappears. JavaScript loads the content the user is meant to see as soon as it can.

The page you see if you do click that link contains the same content which JavaScript loads directly into the search results page. The reason the link appears in the first place is so that users with JavaScript disabled are able to see the same content.
Comment 4 Alex Sassmannshausen 2014-03-17 15:45:53 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2014-03-18 07:28:36 UTC
Created attachment 26433 [details] [review]
[PASSED QA] Bug 11951 - OPAC search suggestions template error

If you have search suggestions enabled in the OPAC and click the "Check
for suggestions" link before it is replaced with the JS-rendered output
you will get a template error. This patch corrects it.

To test you must have the bootstrap theme enabled and at least one
OPAC plugin enabled in Administration -> Did you mean?

- Perform a search in the OPAC.
- Look for a box which says "Not what you expected? Check for
  suggestions"
- Click the "Check for suggestions" link before it disappears. If
  necessary disable JavaScript in your browser so that the link doesn't
  disappear.
- The search suggestions page should render without errors.

Signed-off-by: A. Sassmannshausen <alex.sassmannshausen@ptfs-europe.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
The non-Javascript fallback link now works correctly.
Passes tests and QA script.
Comment 6 Galen Charlton 2014-04-09 22:52:05 UTC
Pushed to master.  Thanks, Owen!
Comment 7 Fridolin Somers 2014-08-06 07:49:01 UTC
Pushed to 3.14.x, will be in 3.14.10