Bug 15888

Summary: Syndetics Reviews preference should not enable LibraryThing reviews
Product: Koha Reporter: Nick Clemens <nick>
Component: OPACAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: brendan, f.demians, julian.maurice
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 15888 - Syndetics Reviews preference should not enable LibraryThing reviews
Bug 15888 - Syndetics Reviews preference should not enable LibraryThing reviews
[PASSED QA] Bug 15888 - Syndetics Reviews preference should not enable LibraryThing reviews

Description Nick Clemens 2016-02-23 20:14:34 UTC
On opac-detail.pl the code below attempts to retrieve LibraryThing content when SyndeticsReviews are enabled even if the librarything prefs are not turned on

 564    [% IF ( SyndeticsReviews && SYNDETICS_REVIEWS ) %]
 565        <li id="tab_reviews"> <a href="#reviews">Reviews</a></li>
 566        <li id="tab_LTFLreviews">
 567            [% IF ( using_https ) %]
 568               <script src="https://www.librarything.com/forlibraries/widget.js?id=[% LibraryThingForLibrariesID %]" type="text/javascript"></script>
 569               <noscript>This page contains enriched content visible when JavaScript is enabled or by clicking <a href="https://www.librarything.com/forlibraries/noscript.php?id=[% LibraryThingForLibrariesID %]&amp;accessibility=1">here</a>.</noscript>
 570            [% ELSE %]
 571               <script src="http://www.librarything.com/forlibraries/widget.js?id=[% LibraryThingForLibrariesID %]" type="text/javascript"></script>
 572               <noscript>This page contains enriched content visible when JavaScript is enabled or by clicking <a href="http://www.librarything.com/forlibraries/noscript.php?id=[% LibraryThingForLibrariesID %]&amp;accessibility=1">here</a>.</noscript>
 573            [% END %]
 57        </li>
 575     [% END %]
Comment 1 Nick Clemens 2016-02-23 20:55:53 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2016-03-02 08:29:15 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2016-03-24 07:04:56 UTC
Created attachment 49519 [details] [review]
[PASSED QA] Bug 15888 - Syndetics Reviews preference should not enable LibraryThing reviews

To test:
1 - Enable Syndetics Reviews without a LibraryThing ID
2 - Check page source and note you have a stanza for LTFL tabbed reveiws
3 - Apply patch
4 - Reload page and note LTFL tabbed reviews are not present
5 - Enter a LibraryThing ID and not the tab is restored.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Brendan Gallagher 2016-03-24 16:08:04 UTC
Pushed to Master - Should be in May 2016 release.  Thanks!
Comment 5 Julian Maurice 2016-04-07 05:48:48 UTC
Patch pushed to 3.22.x, will be in 3.22.6
Comment 6 Frédéric Demians 2016-04-27 15:37:26 UTC
Pushed to 3.20.x, will be in 3.20.11.