This question about Using an extension: Answered
JSCalendarContrib version released 22 Jul seems broken
So it is just me, or did the version of
JSCalendarContrib I upgraded to today broken? Basically I see:
| 2009-08-10T04:48:25Z warning | Can't locate object method "expandMacros" via package "Work" (perhaps you forgot to load "Work"?) at /var/www/foswiki/lib/Foswiki/Form/Date.pm line 51.
at /var/www/foswiki/lib/Foswiki/Form/Date.pm line 51
Foswiki::Form::Date::renderForEdit('Foswiki::Form::Date=HASH(0xab093d8)', 'Work', 'GlenmoreStWorkshopRamp', '2009-06-01') called at /var/www/foswiki/lib/Foswiki/Form.pm line 405
Foswiki::Form::renderForEdit('Foswiki::Form=HASH(0xaa93278)', 'Work', 'GlenmoreStWorkshopRamp', 'Foswiki::Meta=HASH(0xa829bc0)') called at /var/www/foswiki/lib/Foswiki/UI/Edit.pm line 375
Foswiki::UI::Edit::init_edit('Foswiki=HASH(0x9e6fe68)', 'edit') called at /var/www/foswiki/lib/Foswiki/UI/Edit.pm line 44
Foswiki::UI::Edit::edit('Foswiki=HASH(0x9e6fe68)') called at /var/www/foswiki/lib/Foswiki/UI.pm line 299
Foswiki::UI::__ANON__() called at /var/www/foswiki/lib/CPAN/lib//Error.pm line 379
eval {...} called at /var/www/foswiki/lib/CPAN/lib//Error.pm line 371
Error::subs::try('CODE(0x9ef1e70)', 'HASH(0xa81e788)') called at /var/www/foswiki/lib/Foswiki/UI.pm line 381
Foswiki::UI::_execute('Foswiki::Request=HASH(0xa1cb620)', 'CODE(0xa1cb380)', 'edit', 1) called at /var/www/foswiki/lib/Foswiki/UI.pm line 270
Foswiki::UI::handleRequest('Foswiki::Request=HASH(0xa1cb620)') called at /var/www/foswiki/lib/Foswiki/Engine/CGI.pm line 26
Foswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0xa0be2c0)') called
in my logs, and think i have tracked it down for form date rendering in /lib/Foswiki/Form/Date.pm which seems to come from
JSCalendarContrib, and
seems (to my eye) to have a reference to
expandMacros
method about line 51. I can't find this any where. I see is it not in the SVN repo under the 1x06 and 4632 etc. branches, which I think corrsepond to 1.06.
Is it just me?...
You are not alone
I think the problem is in lib/Foswiki/Form/Date.pm. This file was overridden by
JSCalendarContrib. With this version of Date, I got your error when I try to attach the following simple form into a topic
| *Name* | *Type* | *Size* | *Values* |
| Date | date | | |
| 2009-09-05T09:22:26Z warning |
Can't locate object method "expandMacros" via package "Demo" (perhaps you forgot to load "Demo"?) at /opt/foswiki/foswiki/lib/Foswiki/Form/Date.pm line 51. at /opt/foswiki/foswiki/lib/Foswiki/Form/Date.pm line 51
....
--
HackatonWong - 05 Sep 2009
Yeah, it seems whoever uploaded it did a very silly thing. We've been bitten by something we've been fearing for a long time: we don't have (yet) a way to keep several versions of a plugin, and especially tag versions for releases. Here, the currently available version of
JSCalendarContrib from foswiki.org is the one in the Subversion repository from trunk, which is for the next Foswiki version (most probably 1.1). As 1.1 had some major internal re-factoring, and this is a core plugin, there are incompatibilities. What could be done is code some compatibility fallback in the plugin, but it will soon become cumbersome.
Anyway, I think the only safe way here is to upload back the
JSCalendarContrib from the release branch, and for the poor felows who have already upgraded, hum... try to get it back then?
So basically, the version you installed is for 1.1, and you're running 1.0.6 (as it's the latest released Foswiki version).
Let us know here if you need more help rolling back.
--
OlivierRaginel - 05 Sep 2009
It was plainly a mistake that the plugin was uploaded to Extensions web from trunk.
I have restored a 1.0.X version.
A task has been raised to request this extension made backwards compatible. It is not necessary that JSCal is not compatible from 1.1 to 1.0
--
KennethLavrsen - 28 Sep 2009