Bug 13289

Summary: Calendar with weekly repeating holidays completely broken by DataTables upgrade
Product: Koha Reporter: Owen Leonard <oleonard>
Component: ToolsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: blocker    
Priority: P5 - low CC: jonathan.druart, tomascohen
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:
Circulation function:
Attachments: Bug 13289: document.write breaks DataTables
[SIGNED-OFF] Bug 13289: document.write breaks DataTables
[PASSED QA] Bug 13289: document.write breaks DataTables

Description Owen Leonard 2014-11-18 18:07:29 UTC
Bug 12986 (Upgrade the DataTables jQuery plugin to the latest version (1.10.2)) broke the calendar tool ( Tool -> Calendar ) if weekly repeating holidays are present. When I try to access that page I get a blank screen except for the word "Mondays" (or sometimes "Sundays," or sometimes "MondaysSundays").

Truncating the repeatable_holidays fixes the problem. Adding a new repeatable holiday on a specific date (e.g. December 25) doesn't trigger the problem. Adding a new range of holidays repeating yearly doesn't trigger the problem. Adding a holiday which repeats on the same day every week (e.g. "Closed Sunday") *does* trigger the problem.
Comment 1 Jonathan Druart 2014-11-19 14:31:50 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2014-11-19 14:53:59 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2014-11-19 19:40:37 UTC
Created attachment 33694 [details] [review]
[PASSED QA] Bug 13289: document.write breaks DataTables

The document.write in a td seems to brake the page with a new version of
DataTables.

This patch replaces a dirty piece of code with another one (but this one
works...)

Test plan:
Create repeatable holidays and verify the page loads correctly.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Works to fix the problem. The code is definitely an improvement.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, fixes critical problem.
Passes tests and QA script.
Comment 4 Tomás Cohen Arazi (tcohen) 2014-11-20 00:48:12 UTC
Patch pushed to master.

Thanks Jonathan!