Bug 13271

Summary: Subject search links broken if XSLT and OPACPopupAuthorsSearch are both off
Product: Koha Reporter: Owen Leonard <oleonard>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: f.demians, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 13271 - Subject search links broken if XSLT and OPACPopupAuthorsSearch are both off
Bug 13271 - Subject search links broken if XSLT and OPACPopupAuthorsSearch are both off
[PASSED QA] Bug 13271 - Subject search links broken if XSLT and OPACPopupAuthorsSearch are both off

Description Owen Leonard 2014-11-17 17:01:31 UTC
If you have OPACPopupAuthorsSearch disabled and  OPACXSLTDetailsDisplay disabled, clicking a subject search link on the detail page triggers a JavaScript error which prevents the link from working. The click handler for the subject search popup should not be attached to the link if OPACPopupAuthorsSearch isn't turned on.
Comment 1 Owen Leonard 2014-11-18 14:41:39 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2014-11-18 16:39:32 UTC
*** Bug 12634 has been marked as a duplicate of this bug. ***
Comment 3 Frédéric Demians 2014-11-22 08:35:51 UTC
Owen, do you use OPACPopupAuthorsSearch? For my eyes, this syspref and the
associated functionality looks more like code pollution than anything else.
It doesn't work with XSLT, which is a deal breaker. In Unimarc, non- XSL views
are irrelevant.
Comment 4 Frédéric Demians 2014-11-22 08:50:24 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2014-11-22 10:07:58 UTC
Created attachment 33806 [details] [review]
[PASSED QA] Bug 13271 - Subject search links broken if XSLT and OPACPopupAuthorsSearch are both off

This patch corrects some faults in the OPAC's bootstrap template which
prevent additional author and subject searches from working correctly
with OPACPopupAuthorsSearch both on and off.

Some JavaScript has been removed because it was used only by the prog
theme and is obsolete.

Locate a title with multiple subjects and additional authors. Test the
following conditions:

OPACXSLTDetailsDisplay is blank and OPACPopupAuthorsSearch is off:

 - Clicking an additional author or subject link should directly trigger
   the correct search without an JavaScript error.

OPACXSLTDetailsDisplay is blank and OPACPopupAuthorsSearch is on:

 - Clicking an additional author or subject link should trigger a modal
   window where you can select options for searching. Checking boxes and
   submitting the form should perform the correct search.

OPACXSLTDetailsDisplay is set to "default" and OPACPopupAuthorsSearch is
on OR off:

 - Clicking an additional author or subject link should directly trigger
   the correct search without an JavaScript error.
   (OPACPopupAuthorsSearch only works with the non-XSL view).

For extra credit: Test with JavaScript disabled and confirm that link
still work correctly.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>

I confirm the bug and the solution. Before various JS errors: "ReferenceError:
e is not defined" and "ReferenceError: showSubjects is not defined". After:
Comforting silence, and functionnality.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.
Comment 6 Tomás Cohen Arazi 2014-11-22 14:18:10 UTC
Patch pushed to master.

Thanks Owen!