This question about Using an extension: Answered

errors when using %FULLCALENDAR{}%

I've been trying to install and use this plugin on a new Foswiki 1.1.3 installation. The install of the plugin and the dependencies all went fine. There was an error with the HijaxPlugin requiring a version of JSON::XS that doesn't exist (>= 2.29, the latest is 2.3). And the version shown in configure doesn't seem to be the latest version. I downloaded and installed the latest version from the website, but configure is still showing the version as 1.0 for FullCalendar (instead of 1.1) and 1.2 for HijaxPlugin (instead of 1.3).

Anyway, the real problem is that when I insert %FULLCALENDAR{}% into a topic, the calendar renders and then puts up the message %INSTANTIATE% in an attention box. I noticed a few other people posted on this issue. I poked around a bit with Firebug, but I didn't really know what to look for. The only thing I could find is the error "$form is undefined pub/System/FullCalendarPlugin/fcp.js". The same happens when I go to System/WebCalendar. The %INSTANTIATE% message appears to come from a script that is supposed to set %INSTANTIATE% to an error message, but it doesn't for some reason and just displays the variable.

Any ideas on how I can debug this further? I'm not sure if there is a debug mode I can enable for this plugin....

-- ChrisHoefler - 06 Jul 2011


OK, it's down to a change in the way jquery.foswiki.js works. Variables such as scriptUrl, wikiName, web, topic etc. aren't members of the foswiki js object anymore, we have to use the .getPreference() function instead and the variable names all have to be in uppercase. So, in fcp.js,
  • foswiki.scriptUrl becomes foswiki.getPreference('SCRIPTURL')
  • foswiki.web becomes foswiki.getPreference('WEB')
  • foswiki.topic becomes foswiki.getPreference('TOPIC')
  • foswiki.wikiName becomes foswiki.getPreference('WIKINAME')

-- DavidPatterson - 06 Jul 2011


I can confirm that the edits recommended above solve the error message reported. I've updated the SVN version to reflect the changes.

-- ScottHoge - 25 Mar 2013

QuestionForm edit

Subject Using an extension
Extension FullCalendarPlugin
Version Foswiki 1.1.3
Status Answered
Related Topics
Topic revision: r3 - 25 Mar 2013, ScottHoge - This page was cached on 16 Jan 2018 - 08:57.

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