[Bug 27697] New: Opening bibliographic record page prepopulates search bar text
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 Bug ID: 27697 Summary: Opening bibliographic record page prepopulates search bar text Change sponsored?: --- Product: Koha Version: 20.05 Hardware: PC OS: Windows Status: NEW Severity: minor Priority: P5 - low Component: Searching Assignee: koha-bugs@lists.koha-community.org Reporter: ekomala@frgml.org QA Contact: testopia@bugs.koha-community.org On the staff client end: Opening a bibliographic record page populates the search bar with the last text entered in the Search the Catalog search bar for that browser session, even if the search wasn't done on the previous page or tab or by the same logged in user. This also happens when links are opened in new tabs. It only prepopulates search text from the Search the Catalog search bar, not from Advanced Search. Only able to recreate the bug on pages that load within the Normal tab of a bibliographic record page: https://staff.**.bywatersolutions.com/cgi-bin/koha/catalogue/detail.pl?bibli... (including #description, #acq_details, #images) 1. Enter text in the Search the Catalog search bar and Submit 2. Click on a search result to open the record page 3. Search field is prepopulated with previous search text Even as you click through to other pages, on and on, once you open another record page, the search bar will once again prepopulate the last text entered in it. Example that automatically opens in new tab, not directly from a search result: 1. Enter text in the Search the Catalog search bar and Submit 2. Open Tools › Manage staged MARC records › Batch # 3. Click on Record # in righthand column 4. Record page opens in new tab with previous search text prepopulated The search bar should clear out upon loading a new page or tab. One user's search history should never load for another user, despite not closing out and reopening the browser. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23475 CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |nick@bywatersolutions.com --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- It has been added by bug 23475. Nick, maybe we should use sessionStorage instead of localStorage? Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23475 [Bug 23475] Search context is lost when simple search leads to a single record -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|20.05 |master -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 Sally <sally.healey@cheshiresharedservices.gov.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sally.healey@cheshireshared | |services.gov.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Nick, this is very confusing IMO. We should invalidate/reset the value at some point. It's not consistent to have the input prefilled if we are coming from another view than the result view. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|NEW |RESOLVED --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Ha, it's bug 26247. *** This bug has been marked as a duplicate of bug 26247 *** -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|DUPLICATE |--- Status|RESOLVED |REOPENED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 135146 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135146&action=edit Bug 27697: Only preopulate search when we have found a single biblio This patch uses the url parameter we created in 23475 to determine whether we should populate the search bar or not Note - a bookmark with this param will still populate search term with last search To test: 1 - Search staff client for 'cat' 2 - Browse to a patrons checkouts and click on a title, or just go directly to a details page: http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=2850 3 - Search bar says 'cat' 4 - Apply patch 5 - Repeat 1-2 6 - Search bar is not populated 7 - Search "dalek war box set" or a term that finds a single record in your instance 8 - Search bar is populated 9 - Note url like: http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=2850&found1=1 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #3)
Ha, it's bug 26247.
*** This bug has been marked as a duplicate of bug 26247 ***
I unduplicated - that seems more about copying between boxes - this is about populating when we shouldn't -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135146|0 |1 is obsolete| | --- Comment #6 from David Nind <david@davidnind.com> --- Created attachment 135457 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135457&action=edit Bug 27697: Only preopulate search when we have found a single biblio This patch uses the url parameter we created in 23475 to determine whether we should populate the search bar or not Note - a bookmark with this param will still populate search term with last search To test: 1 - Search staff client for 'cat' 2 - Browse to a patrons checkouts and click on a title, or just go directly to a details page: http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=2850 3 - Search bar says 'cat' 4 - Apply patch 5 - Repeat 1-2 6 - Search bar is not populated 7 - Search "dalek war box set" or a term that finds a single record in your instance 8 - Search bar is populated 9 - Note url like: http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=2850&found1=1 Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135457|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 135468 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135468&action=edit Bug 27697: Only preopulate search when we have found a single biblio This patch uses the url parameter we created in 23475 to determine whether we should populate the search bar or not Note - a bookmark with this param will still populate search term with last search To test: 1 - Search staff client for 'cat' 2 - Browse to a patrons checkouts and click on a title, or just go directly to a details page: http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=2850 3 - Search bar says 'cat' 4 - Apply patch 5 - Repeat 1-2 6 - Search bar is not populated 7 - Search "dalek war box set" or a term that finds a single record in your instance 8 - Search bar is populated 9 - Note url like: http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=2850&found1=1 Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Pushed to master |Pushed to stable Version(s)|22.11.00 |22.11.00, 22.05.01 released in| | --- Comment #9 from Lucas Gass <lucas@bywatersolutions.com> --- Pushed to 22.05.x for 22.05.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 --- Comment #10 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- This adds a new warning in the log [2022/06/16 10:31:18] [WARN] CGI::param called in list context from /kohadevbox/koha/catalogue/detail.pl line 626, this can lead to vulnerabilities. See the warning in "Fetching the value or values of a single named parameter" at /usr/share/perl5/CGI.pm line 414. It should be $template->param(found1 => scalar $query->param('found1') ); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 --- Comment #11 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Jonathan Druart from comment #10)
This adds a new warning in the log
[2022/06/16 10:31:18] [WARN] CGI::param called in list context from /kohadevbox/koha/catalogue/detail.pl line 626, this can lead to vulnerabilities. See the warning in "Fetching the value or values of a single named parameter" at /usr/share/perl5/CGI.pm line 414.
It should be
$template->param(found1 => scalar $query->param('found1') );
See bug 30997. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.suzuki@biblibre.com Status|Pushed to stable |Pushed to oldstable Version(s)|22.11.00, 22.05.01 |22.11.00, 22.05.01, released in| |21.11.07 --- Comment #12 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- thx pushed to 21.11.x for 21.11.07 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Status|Pushed to oldstable |Needs documenting --- Comment #13 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=31967 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27697 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED CC| |caroline.cyr-la-rose@inlibr | |o.com --- Comment #14 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- This seems like a bug fix rather than a feature. Not sure what documentation is needed. Closing, but feel free to reopen with details. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org