Bug 14524 - Result list RSS feed broken
Summary: Result list RSS feed broken
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 14418
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-13 10:17 UTC by Katrin Fischer
Modified: 2019-06-27 09:24 UTC (History)
7 users (show)

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


Attachments
Bug 14524: Don't escape query_cgi with uri (3.91 KB, patch)
2015-07-13 14:51 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14524: Don't escape query_cgi with uri (3.96 KB, patch)
2015-07-13 21:07 UTC, Chris Cormack
Details | Diff | Splinter Review
[PASSED QA] Bug 14524: Don't escape query_cgi with uri (4.03 KB, patch)
2015-07-16 22:39 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 Katrin Fischer 2015-07-13 10:17:27 UTC
When subscribing to a RSS feed from the OPAC result list, no results are shown for it. Tested with a dynamic bookmark in Firefox.

Reason might be the use of |html instead of |url/uri as TT filter.

Tested in 3.18.8 so far, but I think other versions are probably also affected.
Comment 1 Magnus Enger 2015-07-13 11:02:45 UTC
Confirmed on current master.
Comment 2 Magnus Enger 2015-07-13 11:03:35 UTC
...and 3.20.1.
Comment 3 Magnus Enger 2015-07-13 11:07:43 UTC
I have this in the OPAC error log:

[Mon Jul 13 13:07:02.090923 2015] [cgi:error] [pid 4481] [client 127.0.0.1:55102] AH01215: [Mon Jul 13 13:07:02 2015] opac-search.pl: Use of uninitialized value in split at /home/magnus/scripts/kohaclone/opac/opac-search.pl line 501.
[Mon Jul 13 13:07:02.096514 2015] [cgi:error] [pid 4481] [client 127.0.0.1:55102] AH01215: [Mon Jul 13 13:07:02 2015] opac-search.pl: WARNING: query problem with   ZOOM error 10014 "CCL parsing error" (addinfo: "Search word expected") from diag-set 'ZOOM' at /home/magnus/scripts/kohaclone/C4/Search.pm line 379.

Not sure what is relevant.
Comment 4 Jonathan Druart 2015-07-13 14:42:38 UTC
Introduced by 14418.

Since query_cgi contains something like "idx=kw&q=42", we should not use the uri filter.
Comment 5 Jonathan Druart 2015-07-13 14:51:52 UTC Comment hidden (obsolete)
Comment 6 Chris Cormack 2015-07-13 21:07:44 UTC Comment hidden (obsolete)
Comment 7 Katrin Fischer 2015-07-16 22:39:36 UTC
Created attachment 41047 [details] [review]
[PASSED QA] Bug 14524: Don't escape query_cgi with uri

According to the doc, we should not escape query_cgi with the uri
filter:
http://www.template-toolkit.org/docs/manual/Filters.html#section_uri

Since query_cgi can contains something like: "idx=kw&q=42", we should
not escape the & char

Test plan:
0/ Don't apply the patch
1/ Go on launch a search at the OPAC
2/ Click on the RSS icon
3/ You should arrive on
opac-search.pl?idx%3Dkw%26q%3D42&count=50&sort_by=acqdate_dsc&format=rss2
The & has been escaped.
4/ Apply the patch
5/ Now you should get result and see an url correctly formatted.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Tomás Cohen Arazi 2015-07-20 13:27:20 UTC
Patch pushed to master.

Thanks Jonathan!
Comment 9 Liz Rea 2015-07-20 22:23:05 UTC
Pushed to 3.18.x will be in 3.18.09
Comment 10 Chris Cormack 2015-07-21 21:07:02 UTC
Doesn't seem to effect translations pushed to 3.20.x will be in 3.20.2
Comment 11 Mason James 2015-07-25 13:13:29 UTC
Pushed to 3.16.x, will be in 3.16.13