New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists
This question about Using an extension: Answered

FullCalendar does not accept items in Mar, May, Oct & Dec

I've got some strange behaviour: I can't store events in the month October and December 2010.

Every time I try this I end up on the WebCalendar topic. The event is not stored.

I can store events on all other months I tested so far.

Any hint where to start debugging?

Michael, is your calendar on the WebCalendar page? Is the page reloading (which would indicate a js error)? Do you have Firebug installed on FF or are use using Chrome/Developer Tools to look for js errors and see what ajax activity is going on? Are there any errors reported in your server logs.

I can't reproduce this locally so I need as much info as you can give.

-- DavidPatterson - 09 Sep 2010

The calendar (%FULLCALENDAR%) is on IVUplanKalender, WebCalendar is the store topic for the calendar events.

Firebug gives me the following in its console when I try to safe a event for october
uncaught exception: Unknown name at position 2
uncaught exception: Unknown name at position 2

I'm not used to Firebug nor am I a developer, could you tell me exectly what you need? I attach some urls and answers from firebug console, which are
  1. loading the topic with the %FULLCALENDAR% macro
  2. change the view to october
  3. the error I get when trying to save a event

  • Q642.log: firebug log for not saving october events
There are following errors in apache error.log:
[Mon Sep 13 12:18:38 2010] [error] [client] [Mon Sep 13 12:18:38 2010] rest: Use of uninitialized value in pattern match (m//) at /var/lib/foswiki/lib/Foswiki/Plugins/FullCalendarPlugin/ line 78., referer: http://wiki/foswiki/bin/view/IVUplan/IVUPlanKalender

I don't know, if they are related, though: They only appear if a event is stored succesfully. I think, the script does not get that far if the error occurs.

-- MichaelLorenzen - 13 Sep 2010

This looks like an error being thrown by the jQuery.UI.Datepicker parseDate() function. Are you manually entering dates in the event submission form? I can (sort of) reproduce your error if I enter a date that does not match the expected format mask.

-- DavidPatterson - 13 Sep 2010

No, I just accept the dates given by the form.

-- MichaelLorenzen - 14 Sep 2010

OK, figured this out. Michael was using localisation and when this is enabled on the wiki and a non-english language is selected, the JQueryPlugin also serves the matching jQuery.UI.datepicker localisation file, e.g. ui.datepicker-de.js. This means that the UI.datepicker plugin (of which parseDate() is being used) expects <foreign language> but the jQuery FullCalendar plugin doesn't have localisation support and is still only speaking english. Hence the errors being thrown on March, May, October and December dates because their short forms are the only ones different when comparing english to german, Mär, Mai, Okt, Dez.

The easy fix is to force UI.datepicker to only speak english by adding this line to fcp.js at the beginning of initForm()
The harder fix is to add localisation support to FullCalendarPlugin.

-- DavidPatterson - 10 Nov 2010

Where should I add the line exactly? If I put it below
function initForm(html) {
it does not work for me.

-- MichaelLorenzen - 15 Nov 2010

I'm sorry for the hassle, Michael. I'm in the middle of adding features to the Hijax, Object and FullCalendar Plugins which is why I haven't made any new releases yet.

The start of my initForm() looks like
function initForm(html) {
   oproot = foswiki.scriptUrl+'/rest/ObjectPlugin/';
   var $apptDateClass = $(".appt_date").attr("disabled","disabled");
   $form = $('#newCalEvent');
      'dateFormat':'d M yy',
and it's working fine with localisation enabled and Deutsch selected.

-- DavidPatterson - 16 Nov 2010

David, I really appreciate your support. Your last code does work for me, too. I can't tell, where the difference to my first try was.

-- MichaelLorenzen - 16 Nov 2010

QuestionForm edit

Subject Using an extension
Extension FullCalendarPlugin
Version Foswiki 1.0.9
Status Answered
Topic attachments
I Attachment Action Size Date Who Comment
Q642.loglog Q642.log manage 41 K 13 Sep 2010 - 10:30 MichaelLorenzen firebug log for not saving october events
Topic revision: r9 - 16 Nov 2010, MichaelLorenzen - This page was cached on 23 Mar 2018 - 06:24.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License