Bug 21850 - Remove search request from page title of OPAC result list
Summary: Remove search request from page title of OPAC result list
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-16 13:56 UTC by Katrin Fischer
Modified: 2019-04-28 10:51 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 21850: Remove search request from page title of OPAC result list (3.78 KB, patch)
2019-01-04 15:54 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 21850: Remove search request from page title of OPAC result list (3.84 KB, patch)
2019-01-04 19:00 UTC, Maryse Simard
Details | Diff | Splinter Review
Bug 21850: Remove search request from page title of OPAC result list (3.90 KB, patch)
2019-01-04 22:36 UTC, mikael Olangcay Brisebois
Details | Diff | Splinter Review
Bug 21850: Remove search request from page title of OPAC result list (3.96 KB, patch)
2019-01-13 20:20 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21850: (follow-up) Add query information in title attribute (1.82 KB, patch)
2019-01-28 18:50 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2018-11-16 13:56:26 UTC
When externally linking to an OPAC search result list from external tools (for example Facebook) some use the page title as automatic link description.

The page title for search results in the OPAC currently includes the search request, but is not reasily readable for humans.

Example:
Bibliothek XYZ - Katalog ›  Ergebnisse der Suche  nach 'au,wrdl: Funke' eingeschränkt auf: 'ln,rtrn:ger mc-itype,phr:BUCH or mc-itype,phr:BUCHK or mc-itype,phr:KURSBUCH'

This was: 
Author: Funke
Language: German
Itemtype: Books (which is a grouped itemtype that is actually several)

This, as you see, gets even more confusing if the language is not English, because people might understand even less of the zebra index names.

We propose to remove that part from the page title.
Comment 1 Owen Leonard 2018-11-29 13:03:12 UTC
We could also look into providing Open Graph data for pages like search results, lists, details. http://ogp.me/
Comment 2 Katrin Fischer 2018-11-29 15:46:33 UTC
I think this would be nice for the detail pages maybe?

I am not sure how it would like for the result list as we cannot provide a human-readable form of the search atm. Especially with translations in mind.

Would you be opposed to remove the search bit from the page title as a first step?
Comment 3 Owen Leonard 2019-01-04 15:54:59 UTC
Created attachment 83640 [details] [review]
Bug 21850: Remove search request from page title of OPAC result list

This patch modifies the OPAC search results template so that advanced
search terms are not shown in the page title and breadcrumbs. This
removes potentially confusing computer-oriented code from the public
view.

For simple searches the search term is displayed, using the same logic
that determines whether the search bar should be populated with the last
search term.

To test:

 - Apply the patch
 - Peform a simple keyword search in the OPAC
   - On the results page the title and breadcrumbs should show 'Results
     of search for [your keyword]
 - Perform an advanced search with multiple parameters
   - The page title and breadrumbs should show only 'Search results'
   - The breadcrumbs should also show a link back to Advanced search
     using the returntosearch parameter
Comment 4 Maryse Simard 2019-01-04 19:00:32 UTC
Created attachment 83650 [details] [review]
Bug 21850: Remove search request from page title of OPAC result list

This patch modifies the OPAC search results template so that advanced
search terms are not shown in the page title and breadcrumbs. This
removes potentially confusing computer-oriented code from the public
view.

For simple searches the search term is displayed, using the same logic
that determines whether the search bar should be populated with the last
search term.

To test:

 - Apply the patch
 - Peform a simple keyword search in the OPAC
   - On the results page the title and breadcrumbs should show 'Results
     of search for [your keyword]
 - Perform an advanced search with multiple parameters
   - The page title and breadrumbs should show only 'Search results'
   - The breadcrumbs should also show a link back to Advanced search
     using the returntosearch parameter

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Comment 5 mikael Olangcay Brisebois 2019-01-04 22:36:41 UTC
Created attachment 83673 [details] [review]
Bug 21850: Remove search request from page title of OPAC result list

This patch modifies the OPAC search results template so that advanced
search terms are not shown in the page title and breadcrumbs. This
removes potentially confusing computer-oriented code from the public
view.

For simple searches the search term is displayed, using the same logic
that determines whether the search bar should be populated with the last
search term.

To test:

 - Apply the patch
 - Peform a simple keyword search in the OPAC
   - On the results page the title and breadcrumbs should show 'Results
     of search for [your keyword]
 - Perform an advanced search with multiple parameters
   - The page title and breadrumbs should show only 'Search results'
   - The breadcrumbs should also show a link back to Advanced search
     using the returntosearch parameter

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: mikael <mikael.Olangcay-Brisebois@inlibro.com>
Comment 6 Katrin Fischer 2019-01-13 20:20:00 UTC
Created attachment 83850 [details] [review]
Bug 21850: Remove search request from page title of OPAC result list

This patch modifies the OPAC search results template so that advanced
search terms are not shown in the page title and breadcrumbs. This
removes potentially confusing computer-oriented code from the public
view.

For simple searches the search term is displayed, using the same logic
that determines whether the search bar should be populated with the last
search term.

To test:

 - Apply the patch
 - Peform a simple keyword search in the OPAC
   - On the results page the title and breadcrumbs should show 'Results
     of search for [your keyword]
 - Perform an advanced search with multiple parameters
   - The page title and breadrumbs should show only 'Search results'
   - The breadcrumbs should also show a link back to Advanced search
     using the returntosearch parameter

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: mikael <mikael.Olangcay-Brisebois@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2019-01-13 20:20:23 UTC
Thank you, Owen, I really like the solution.
Comment 8 Owen Leonard 2019-01-28 18:50:43 UTC
Created attachment 84499 [details] [review]
Bug 21850: (follow-up) Add query information in title attribute

This follow-up adds back the old machine-friendly search details to a
title attribute in case it might be useful for debugging purposes.

To test, apply the patch and perform a search in the OPAC. On the search
results page, hover your mouse over the "Results" link in the
breadcrumbs. The title attribute value should appear with the search
details.
Comment 9 Nick Clemens 2019-02-04 17:45:46 UTC
Awesome work all!

Pushed to master for 19.05
Comment 10 Martin Renvoize 2019-02-11 13:49:09 UTC
Another nice enhancement that won't be backported to the current stable 18.11.x series.