-
Bug
-
Resolution: Outdated
-
Neutral
-
None
-
None
I believe the javascript that is used to add a calendar feature (calendar.js) contains an error:
Error: too much recursion
Source File: http://<domainName>/magnoliaAuthor/.resources/calendar/calendar.js
Line: 1797
I bumped into this as I added a "custom" calendar to my website using some javascript. At some point in this "custom" calendar I do a call on the setFullYear(Y) function of the Date object. That's where the error comes up (stack overflow).
It seems that calendar.js (coming from Magnolia own calendar) is redefining this Date.setFullYear(Y) function for some reason! And it does it badly which creates a stack overflow
This issue only comes up in IE I believe - I tried with IE8 and below and it came up every time. Chrome seem to manage this issue and I believe Firefox too. It would have to be checked though.
+ It looks like the error is fixable, see http://community.zikula.org/module-Forum-viewtopic-topic-57870.htm
- Replace the following:
Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;
- With:
if( Date.prototype.__msh_oldSetFullYear == null ) { Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear; }