Bug 20420 - Remove unnecessary [% KOHA_VERSION %] from OPAC third-party sources
Summary: Remove unnecessary [% KOHA_VERSION %] from OPAC third-party sources
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 12904
Blocks:
  Show dependency treegraph
 
Reported: 2018-03-15 10:16 UTC by Owen Leonard
Modified: 2018-12-03 20:03 UTC (History)
1 user (show)

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


Attachments
Bug 20420 - Remove unnecessary [% KOHA_VERSION %] from OPAC third-party sources (3.20 KB, patch)
2018-03-15 10:47 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20420 - Remove unnecessary [% KOHA_VERSION %] from OPAC third-party sources (3.26 KB, patch)
2018-03-15 14:22 UTC, Brendan Gallagher
Details | Diff | Splinter Review
k (3.32 KB, patch)
2018-03-25 16:02 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20420: Remove unnecessary [% KOHA_VERSION %] from OPAC third-party sources (3.32 KB, patch)
2018-03-25 16:03 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 Owen Leonard 2018-03-15 10:16:02 UTC
Three third-party scripts in the OPAC have had [% KOHA_VERSION %] added to them, which breaks the features they're associated with.

Google Indic Translation
Novelist
Google+
Comment 1 Owen Leonard 2018-03-15 10:35:56 UTC
Correction: Google Indic Transliteration is not affected, Twitter is.
Comment 2 Owen Leonard 2018-03-15 10:47:45 UTC
Created attachment 72927 [details] [review]
Bug 20420 - Remove unnecessary [% KOHA_VERSION %] from OPAC third-party sources

This patch removes [% KOHA_VERSION %] from the <script> tag for some
third-party JavaScript sources. [% KOHA_VERSION %] should only be used
for Koha's JS resources.

To test, apply the patch and enable the SocialNetworks and
NovelistSelect* preferences.

In the OPAC, view the detail page for a bibliographic record. In the
right-hand sidebar you should see social network icons for Google+ and
Twitter. Clicking either of them should trigger a sharing popup window.

If you have Novelist credentials and can enable the feature for the OPAC
you should see Novelist content in the place specified in your
preferences.

If you don't have Novelist credentials, put some random text in the
NovelistSelectProfile system preference. Looking at the detail page in
the OPAC, view source. You should see a link to Novelist JS around line
1020 of the source. Clicking the link should show JavaScript. This
confirms that the path is correct, thus the bug has been fixed.

Note: The QA tool will complain that [% KOHA_VERSION %] is missing. This
is a false positive.
Comment 3 Brendan Gallagher 2018-03-15 14:22:49 UTC
Created attachment 72964 [details] [review]
Bug 20420 - Remove unnecessary [% KOHA_VERSION %] from OPAC third-party sources

This patch removes [% KOHA_VERSION %] from the <script> tag for some
third-party JavaScript sources. [% KOHA_VERSION %] should only be used
for Koha's JS resources.

To test, apply the patch and enable the SocialNetworks and
NovelistSelect* preferences.

In the OPAC, view the detail page for a bibliographic record. In the
right-hand sidebar you should see social network icons for Google+ and
Twitter. Clicking either of them should trigger a sharing popup window.

If you have Novelist credentials and can enable the feature for the OPAC
you should see Novelist content in the place specified in your
preferences.

If you don't have Novelist credentials, put some random text in the
NovelistSelectProfile system preference. Looking at the detail page in
the OPAC, view source. You should see a link to Novelist JS around line
1020 of the source. Clicking the link should show JavaScript. This
confirms that the path is correct, thus the bug has been fixed.

Note: The QA tool will complain that [% KOHA_VERSION %] is missing. This
is a false positive.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Comment 4 Katrin Fischer 2018-03-25 16:02:33 UTC
Created attachment 73243 [details] [review]
k
Comment 5 Katrin Fischer 2018-03-25 16:03:11 UTC
Created attachment 73244 [details] [review]
Bug 20420: Remove unnecessary [% KOHA_VERSION %] from OPAC third-party sources

This patch removes [% KOHA_VERSION %] from the <script> tag for some
third-party JavaScript sources. [% KOHA_VERSION %] should only be used
for Koha's JS resources.

To test, apply the patch and enable the SocialNetworks and
NovelistSelect* preferences.

In the OPAC, view the detail page for a bibliographic record. In the
right-hand sidebar you should see social network icons for Google+ and
Twitter. Clicking either of them should trigger a sharing popup window.

If you have Novelist credentials and can enable the feature for the OPAC
you should see Novelist content in the place specified in your
preferences.

If you don't have Novelist credentials, put some random text in the
NovelistSelectProfile system preference. Looking at the detail page in
the OPAC, view source. You should see a link to Novelist JS around line
1020 of the source. Clicking the link should show JavaScript. This
confirms that the path is correct, thus the bug has been fixed.

Note: The QA tool will complain that [% KOHA_VERSION %] is missing. This
is a false positive.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Jonathan Druart 2018-03-26 20:38:34 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 7 Nick Clemens 2018-04-23 22:34:59 UTC
Not needed for 17.11