Bug 8686 - Raise required version of URI::Escape to 3.31
Summary: Raise required version of URI::Escape to 3.31
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Katrin Fischer
QA Contact: Jonathan Druart
URL: cgi-bin/koha/catalogue/search.pl?q=au...
Whiteboard:
Keywords: dependency
: 9990 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-08-24 15:45 UTC by Nicole C. Engard
Modified: 2016-12-05 21:23 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
author search (135.02 KB, image/png)
2012-08-24 15:45 UTC, Nicole C. Engard
Details
no check boxes (258.12 KB, image/png)
2012-09-27 16:01 UTC, Nicole C. Engard
Details
search settings (249.65 KB, image/png)
2012-09-28 16:35 UTC, Nicole C. Engard
Details
Bug 8686: Raise required version of URI::Escape to 3.31 (843 bytes, patch)
2015-06-07 21:46 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 8686: Raise required version of URI::Escape to 3.31 (1.20 KB, patch)
2015-06-14 02:13 UTC, M. Tompsett
Details | Diff | Splinter Review
Bug 8686: Raise required version of URI::Escape to 3.31 (1.45 KB, patch)
2015-06-18 10:09 UTC, Jonathan Druart
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 2012-08-24 15:45:36 UTC
Created attachment 11825 [details]
author search

The menu bar that lets you put things in lists and such at the top of the results in the staff client goes away - along with the check boxes when you do an author search.

See attached.
Comment 1 Owen Leonard 2012-09-06 19:37:08 UTC
I cannot reproduce this bug. I'm wondering if there are some system preferences in play here. I see your screenshot has no cover images, so I turned those off. Is that correct? XSLT display? Custom javascript in use?
Comment 2 Nicole C. Engard 2012-09-08 20:20:09 UTC
It's not happening anymore .. not sure what it was, but it wasn't custom xslt cause I don't have that :)
Comment 3 Nicole C. Engard 2012-09-27 16:01:25 UTC
Okay it's happening again.

cgi-bin/koha/catalogue/search.pl?q=au:"Tepper, Sheri S."
Comment 4 Nicole C. Engard 2012-09-27 16:01:45 UTC
Created attachment 12564 [details]
no check boxes
Comment 5 Nicole C. Engard 2012-09-27 16:04:56 UTC
That link by the way came from me clicking an author name on a bib record - not by searching for an author via the search screen. If I search from the search box it shows the checkboxes.  But the URL is different.

cgi-bin/koha/catalogue/search.pl?idx=au%2Cphr&q=tepper%2C+sheri+s.&op=and&idx=kw&op=and&idx=kw&sort_by=relevance

So the problem is with the author link on bib records in the staff client.

Nicole
Comment 6 Nicole C. Engard 2012-09-27 16:06:20 UTC
Also if you click the author name on a bib record on the search results you get the same result.
Comment 7 Owen Leonard 2012-09-28 15:36:42 UTC
(In reply to comment #3)
> cgi-bin/koha/catalogue/search.pl?q=au:"Tepper, Sheri S."

I still can't reproduce this on my system. I can on ByWater's demo, and I notice that removing the quotes from that URL fixes the problem. Now I'm guessing I can't reproduce the error because I have a different search configuration?
Comment 8 Nicole C. Engard 2012-09-28 16:35:57 UTC
Created attachment 12596 [details]
search settings

I am doing this on my own install, so here are my settings for searching
Comment 9 Owen Leonard 2012-09-28 16:54:40 UTC
It looks to me like this is a JavaScript problem because a variable being passed to JavaScript isn't properly escaped (hence the difference bewteen <"Tepper, Sheri S."> and <Tepper, Sheri S.>. Tracing the variable back leads me to Search.pm, line 2770:

    for my $field (qw/ lccn isbn issn title author dewey subject /)
    {
        my $encvalue = URI::Escape::uri_escape_utf8($bibrec->{$field});
        push @$array, { name=>$field, value=>$bibrec->{$field}, encvalue=>$encvalue } if defined $bibrec->{$field};
    }

I think $encvalue is different on systems which show the error. My copy of URI::Escape is version 3.31, but ByWater's demo reports 3.30. Could that version difference be the source of the different outcomes?
Comment 10 Nicole C. Engard 2012-09-28 17:34:18 UTC
Owen,

I'm not using ByWater's demo ... I'm using my own local install of Master ... so I don't know what's up with the demo site (it's not on the most recent version of master)
Comment 11 Owen Leonard 2013-04-06 13:18:03 UTC
Nicole's comment from Bug 9990: "This stops happening if you upgrade URI::Escape to 3.31.  We should make it clear in the Perl Modules page that an upgrade is needed."
Comment 12 Owen Leonard 2013-04-06 13:18:11 UTC
*** Bug 9990 has been marked as a duplicate of this bug. ***
Comment 13 Nicole C. Engard 2014-06-10 20:09:38 UTC
See this video: http://www.screencast.com/t/tETuccHQ still an issue in 3.14.x
Comment 14 Katrin Fischer 2015-06-07 00:36:29 UTC
The mininum required version of URI::Escape is listed as 
'min_ver'  => '1.36'

Robin, is raising the version here a problem for packages?
Comment 15 Robin Sheat 2015-06-07 01:13:38 UTC
(In reply to Katrin Fischer from comment #14)
> The mininum required version of URI::Escape is listed as 
> 'min_ver'  => '1.36'
> 
> Robin, is raising the version here a problem for packages?

Nope, URI::Escape 3.31 is contained in URI 1.60, which is in Wheezy. 

http://search.cpan.org/~gaas/URI-1.60/
https://packages.debian.org/search?keywords=liburi-perl&searchon=names&suite=all&section=all

So everything should be fine ☺
Comment 16 Katrin Fischer 2015-06-07 01:19:23 UTC
wow. quick reply :) Thx!
Comment 17 Katrin Fischer 2015-06-07 21:46:41 UTC Comment hidden (obsolete)
Comment 18 M. Tompsett 2015-06-14 02:13:54 UTC Comment hidden (obsolete)
Comment 19 Jonathan Druart 2015-06-18 10:09:41 UTC
Created attachment 40270 [details] [review]
Bug 8686: Raise required version of URI::Escape to 3.31

Raises the minimum required version of URI::Escape from
1.36 to 3.31.

TEST PLAN
---------
1) git branch -b bug_8686 origin/master
2) ./koha_perl_deps.pl -a | grep URI
   -- it will list 1.36 required
3) git bz apply 8686
4) ./koha_perl_deps.pl -a | grep URI
   -- it will list 3.31 required
5) koha qa test tools

NOTE: Also default in Ubuntu 14.04 LTS,
      not just Wheezy as noted in comment #15.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signoff based on Nicole's comment (bug 9990 comment 6):
"This stops happening if you upgrade URI::Escape to
3.31.  We should make it clear in the Perl Modules page that an upgrade
is needed."
Comment 20 Tomás Cohen Arazi 2015-06-19 14:46:40 UTC
Patch pushed to master.

Thanks Katrin!
Comment 21 Chris Cormack 2015-06-25 21:10:14 UTC
Pushed to 3.20.x will be in 3.20.2
Comment 22 Liz Rea 2015-07-20 21:56:40 UTC
Pushed to 3.18.x, will be in 3.18.09
Comment 23 Mason James 2015-07-25 10:29:37 UTC
Pushed to 3.16.x, will be in 3.16.13