You are here: Foswiki>Tasks Web>Item907 (08 May 2010, RadishLee)Edit Attach

Item907: RenderFormPlugin causes JSCalendarContrib to stack overflow

Priority: Normal
Current State: Closed
Released In:
Target Release: n/a
Applies To: Extension
Component: RenderFormPlugin
Reported By: KennethLavrsen
Waiting For:
Last Change By: RadishLee
We have a bug in Foswiki that I never saw in TWiki

When you use JSCalendarContrib in EditTablePlugin and ActionTrackerPlugin and change month you get a stack overflow error "stack overflow at line 1801".

IE7 reports it and fails. FF hangs for a long time.

We need this fixed for 1.0.1

Table below should show it. Hit the edit table button. Click on a calendar and try and hit the small arrow that changes month. When you hit end of the year the stack overflow happens in IE7

Milestone Plan Forecast Actual
Doc Input
11 Sep 2007
30 Sep 2007
Doc Plan
26 Sep 2007
26 Sep 2007
Some Start Milestone
13 Feb 2009
14 Sep 2007

KennethLavrsen - 29 Jan 2009

Strange it does not show here on But it does in my trunk.

Did someone change javascript stuff lately on trunk that can cause this?

-- KennethLavrsen - 29 Jan 2009

I did some Googling and the stack overflow is common with JSCalendar when people make a bug and load the JS twice.

And this is exactly what we do in PatternSkin. But not in the Foswiki skin here.

Where does that get loaded and why?

-- KennethLavrsen - 30 Jan 2009

No it is not skin.

It is a plugin that does it. I turned all off except table and edit table. And problem is gone.

I will report back.

-- KennethLavrsen - 30 Jan 2009

Unfortunately the Dynarch date picker js is no longer updated.


-- ArthurClemens - 30 Jan 2009

Problem found.

It is RenderFormPlugin that loads the JSCalendar js files one more time unconditionally in the body at the bottom. A total lame hack.

Changing to RenderFormPlugin bug. Not urgent. Nothing to worry about with JS as long as we only load the JS once.

-- KennethLavrsen - 30 Jan 2009

After having fixed Item913 I now understand why the "lame hack" was made. It was because of a "lame bug" in Func.

This is now fixed. I am fixing this bug also now. The fix I make both changes the hack to the recommended way for JSCalendar.

AND it also make the calls happening less frequent by using the postRenderingHandler. This easily saves 10-15 calls to adding the same js stuf to the header at the expense of maybe 3 calls to the extra handler.

This fix also works around the bug in core so this fix can be implemented in the TWiki version of this plugin and should work even though TWiki has this bug. And it will work for Foswiki 1.0.0 so people do not need to wait for 1.0.1 for this plugin to work.

-- KennethLavrsen - 31 Jan 2009

ItemTemplate edit

Summary RenderFormPlugin causes JSCalendarContrib to stack overflow
ReportedBy KennethLavrsen
Codebase 1.0.0, trunk
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component RenderFormPlugin
Priority Normal
CurrentState Closed
Checkins distro:7c828aea5362
TargetRelease n/a
Topic revision: r6 - 08 May 2010, RadishLee
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy