Bug 13289 - Calendar with weekly repeating holidays completely broken by DataTables upgrade
Summary: Calendar with weekly repeating holidays completely broken by DataTables upgrade
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low blocker
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-18 18:07 UTC by Owen Leonard
Modified: 2019-06-27 09:24 UTC (History)
2 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:
Circulation function:


Attachments
Bug 13289: document.write breaks DataTables (1.70 KB, patch)
2014-11-19 14:31 UTC, Jonathan Druart
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 13289: document.write breaks DataTables (1.87 KB, patch)
2014-11-19 14:53 UTC, Owen Leonard
Details | Diff | Splinter Review
[PASSED QA] Bug 13289: document.write breaks DataTables (1.95 KB, patch)
2014-11-19 19:40 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 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!