Bug 20090 - Missing Script Statement for Novelist Select on Some Record Displays in OPAC
Summary: Missing Script Statement for Novelist Select on Some Record Displays in OPAC
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: David Kuhn
QA Contact: Marcel de Rooy
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-25 17:07 UTC by David Kuhn
Modified: 2018-07-30 13:08 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 20090 - Missing Script Statement for Novelist Select on Some Record Displays in OPAC (3.30 KB, patch)
2018-01-25 17:29 UTC, David Kuhn
Details | Diff | Splinter Review
Bug 20090: Missing script statement for Novelist Select on some record displays in OPAC (3.55 KB, patch)
2018-07-08 14:15 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20090: Missing script statement for Novelist Select on some record displays in OPAC (3.63 KB, patch)
2018-07-13 06:11 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Kuhn 2018-01-25 17:07:35 UTC
This applies to libraries using Novelist Select enhanced content in their OPAC.
Items with a UPC code but no ISBN are causing a script error (a call to an undefined function) in the opac-detail display. This is preventing custom jQuery/scripts from running (as well as keeping any content from Novelist from displaying).

The cause:

Not all of the conditionals for Novelist in opac-detail.tt are checking for UPCs, most notably the statement that adds the script for using Novelist. This can result in calls to non-existent functions.

To test (note that you must subscribe to Novelist Select):

1. If your library does not use the patron ratings feature, activate it for the purposes of this test.

2. Display a record in the opac that has an ISBN number. Note that the rating option has 5 stars to choose from.

3. Display a record that does not have an ISBN in the 020 field, but has a upc (or other code) in the 024 field. The rating option will display as 5 radio buttons and a "rate it" button (the radio buttons are normally replaced by stars via a built-in jQuery script).
Comment 1 David Kuhn 2018-01-25 17:29:19 UTC
Created attachment 70920 [details] [review]
Bug 20090 - Missing Script Statement for Novelist Select on Some Record Displays in OPAC

This patch adds a check for UPCs and well as ISBNs to the Novelist Select conditionals in opac-detail.tt

To test (note that you must subscribe to Novelist Select):

1. If your library does not use the raton ratings feature, activate it for the purposes of this test.

2. Display a record that does not have an ISBN in the 020 field, but has a upc (or other code) in the 024 field. The rating option will

display as 5 radio buttons and a "rate it" button.

3. Apply the patch.

4. Display the same record again. The radio buttons will be replaced with stars. This indicates that the scripts on the page completed.

Rather that using the patron ratings as in indicator, you can also use a web page inspector/debugger such as firebug or the built-in

inspectors in most newer browsers to check for script errors.
Comment 2 Katrin Fischer 2018-07-08 14:15:17 UTC
Created attachment 76757 [details] [review]
Bug 20090: Missing script statement for Novelist Select on some record displays in OPAC

This patch adds a check for UPCs and well as ISBNs to the Novelist Select conditionals in opac-detail.tt

To test (note that you must subscribe to Novelist Select):

1. If your library does not use the raton ratings feature, activate it for the purposes of this test.

2. Display a record that does not have an ISBN in the 020 field, but has a upc (or other code) in the 024 field. The rating option will

display as 5 radio buttons and a "rate it" button.

3. Apply the patch.

4. Display the same record again. The radio buttons will be replaced with stars. This indicates that the scripts on the page completed.

Rather that using the patron ratings as in indicator, you can also use a web page inspector/debugger such as firebug or the built-in

inspectors in most newer browsers to check for script errors.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
I couldn't check with Novelist Select, but read and checked changed made carefully.
Comment 3 Marcel de Rooy 2018-07-13 06:11:05 UTC
Created attachment 76929 [details] [review]
Bug 20090: Missing script statement for Novelist Select on some record displays in OPAC

This patch adds a check for UPCs and well as ISBNs to the Novelist Select conditionals in opac-detail.tt

To test (note that you must subscribe to Novelist Select):

1. If your library does not use the raton ratings feature, activate it for the purposes of this test.

2. Display a record that does not have an ISBN in the 020 field, but has a upc (or other code) in the 024 field. The rating option will

display as 5 radio buttons and a "rate it" button.

3. Apply the patch.

4. Display the same record again. The radio buttons will be replaced with stars. This indicates that the scripts on the page completed.

Rather that using the patron ratings as in indicator, you can also use a web page inspector/debugger such as firebug or the built-in

inspectors in most newer browsers to check for script errors.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
I couldn't check with Novelist Select, but read and checked changed made carefully.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Nick Clemens 2018-07-13 13:47:30 UTC
Awesome work all!

Pushed to master for 18.11
Comment 5 Martin Renvoize 2018-07-15 19:19:41 UTC
Pushed to 18.05.x for 18.05.02
Comment 6 Fridolin SOMERS 2018-07-30 13:08:43 UTC
Pushed to 17.11.x for 17.11.09