Bug 17790 - Fix js error on undefined autocomplete(...).data(...) in js_includes.inc
Summary: Fix js error on undefined autocomplete(...).data(...) in js_includes.inc
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
: 17789 (view as bug list)
Depends on:
Blocks: 14570
  Show dependency treegraph
 
Reported: 2016-12-19 11:54 UTC by Marcel de Rooy
Modified: 2017-12-07 22:15 UTC (History)
4 users (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 17790: Fix js error on undefined autocomplete(...).data(...) (2.71 KB, patch)
2016-12-19 12:07 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 17790: Fix js error on undefined autocomplete(...).data(...) (2.72 KB, patch)
2016-12-19 13:54 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 17790: Fix js error on undefined autocomplete(...).data(...) (2.79 KB, patch)
2016-12-20 13:06 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2016-12-19 11:54:48 UTC
If #findborrower does not exist, you cannot define _renderItem.
Comment 1 Marcel de Rooy 2016-12-19 12:07:55 UTC
Created attachment 58273 [details] [review]
Bug 17790: Fix js error on undefined autocomplete(...).data(...)

Bug 17418 moved some code to js_includes.inc.
But if #findborrower does not exist, you cannot define _renderItem.
Trivial fix.

Test plan:
[1] Find a page where this include is used and #findborrowers is absent.
    Like about.pl
[2] Without this patch, you will have a js error in the js console.
[3] With this patch, you should no longer have it.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Marcel de Rooy 2016-12-19 13:38:44 UTC
*** Bug 17789 has been marked as a duplicate of this bug. ***
Comment 3 Nick Clemens 2016-12-19 13:54:50 UTC
Created attachment 58274 [details] [review]
Bug 17790: Fix js error on undefined autocomplete(...).data(...)

Bug 17418 moved some code to js_includes.inc.
But if #findborrower does not exist, you cannot define _renderItem.
Trivial fix.

Test plan:
[1] Find a page where this include is used and #findborrowers is absent.
    Like about.pl
[2] Without this patch, you will have a js error in the js console.
[3] With this patch, you should no longer have it.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 4 Jonathan Druart 2016-12-20 13:06:46 UTC
Created attachment 58289 [details] [review]
Bug 17790: Fix js error on undefined autocomplete(...).data(...)

Bug 17418 moved some code to js_includes.inc.
But if #findborrower does not exist, you cannot define _renderItem.
Trivial fix.

Test plan:
[1] Find a page where this include is used and #findborrowers is absent.
    Like about.pl
[2] Without this patch, you will have a js error in the js console.
[3] With this patch, you should no longer have it.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 5 Jonathan Druart 2016-12-20 13:08:20 UTC
This #findborrower element is present on almost every page, it makes sense to keep it in js_includes.inc
Comment 6 Kyle M Hall 2016-12-20 14:18:27 UTC
Pushed to master for 17.05, thanks Marcel!
Comment 7 Katrin Fischer 2016-12-22 19:16:22 UTC
js_includes.inc was introduced by bug 17416 which is not in 16.11.x - bug fix is not needed in 16.11.x.