Bug 9309

Summary: "OPACurlOpenInNewWindow" isn't respected for 856$u links shown in OPAC when not using XSLT
Product: Koha Reporter: Robin Sheat <robin>
Component: OPACAssignee: Robin Sheat <robin>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: minor    
Priority: P5 - low CC: chris, jonathan.druart
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 9309 - Make OPACurlOpenInNewWindow be respected for 856$u
Bug 9309 - Make OPACurlOpenInNewWindow be respected for 856$u
Bug 9309 - Make OPACurlOpenInNewWindow be respected for 856$u
[SIGNED-OFF] Bug 9309 - Make OPACurlOpenInNewWindow be respected for 856$u
Bug 9309 - Make OPACurlOpenInNewWindow be respected for 856$u

Description Robin Sheat 2012-12-20 02:01:17 UTC
On the surface, this looks like a problem from the conversion to T::T.
Comment 1 Robin Sheat 2012-12-20 02:51:18 UTC Comment hidden (obsolete)
Comment 2 Robin Sheat 2012-12-20 02:54:50 UTC
Note that this backports to 3.8 quite happily.
Comment 3 Robin Sheat 2012-12-20 03:05:56 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2012-12-26 15:56:58 UTC
This doesn't work for me unless I replace "OPACurlOpenInNewWindow" with "OPACURLOpenInNewWindow" (matching the case of the system preference).
Comment 5 Robin Sheat 2012-12-30 22:54:11 UTC
In that case, there'll be a multitude of bugs:

$ grep OPACurlOpenInNewWindow koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | wc -l
6

Also, I just retested it, and it works for me as it's submitted here. However it does make more sense for the capitalisation to match, so I'll fix that up for this case.
Comment 6 Robin Sheat 2012-12-30 23:01:51 UTC Comment hidden (obsolete)
Comment 7 Owen Leonard 2012-12-31 13:32:25 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2013-01-14 16:12:34 UTC
QA Comment:

The patch fixes a variable scoping and reintroduces a broken feature.

Marked as Passed QA.
Comment 9 Jonathan Druart 2013-01-14 16:12:54 UTC
Created attachment 14567 [details] [review]
Bug 9309 - Make OPACurlOpenInNewWindow be respected for 856$u

If a biblio record contained a URL, and the OPAC was using the "normal"
(non-XSLT) display for records, then these links would never open a new
window. With this patch, they will.

Test plan:
1) have a biblio containing an 856$u link
2) set OPACurlOpenInNewWindow to "true"
3) do not use XSLT for displaying the detail pages in the OPAC
4) view the record, click the link, and note that it opens in the
   current window.
5) apply the patch
6) reload the detail page, click the link, and note that it opens a new
   window.

Sponsored-By: National Institute of Water and Atmospheric Research
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 10 Jared Camins-Esakov 2013-01-16 03:01:51 UTC
This patch has been pushed to master.
Comment 11 Chris Cormack 2013-01-16 06:47:00 UTC
Pushed to 3.8.x and 3.10.x will be in 3.8.9 and 3.10.2