NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use trunk.foswiki.org to view this page for some minimal testing.
Use Item11383 for general documentation changes for release 1.1.5. Use Item9693 for docu changes for release 2.0.

Item1546: CalendarPlugin issues when included

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Waiting for Release Extension CalendarPlugin  

FIX FOR THE PROBLEM DESCRIBED BELOW:

--- CalendarPlugin.pm-2009-05-01        2009-05-01 16:37:48.000000000 +0000
+++ CalendarPlugin.pm   2009-05-01 16:44:44.000000000 +0000
@@ -453,6 +453,9 @@
     # (don't rely on Foswiki::Func::expandCommonVariables to avoid deep recursion)
     $text =~ s/%INCLUDE{(.*?)}%/&expandIncludedEvents( $1, $options{web}, $options{topic}, () )/geo;
 
+    $text =~ s/%CALENDAR[^%]*%/_WAS_A_CALENDAR_CALL_HERE_/g;
+    $text = TWiki::Func::expandCommonVariables($text, $theTopic, $theWeb);
+
     # Before this was modified to do multiple months, there was a
     # clause to bail out early if there were no events, simply
     # returning a "blank" calendar. However, since the plugin can now

BUGS FOR THE ABOVE FIX

  • if a CALENDAR takes data from another CALENDAR using a list mode, it will fail. Just include the same base data and it will work.

PROBLEM DESCRIPTION

If you have dynamic entries in a document, and use this document as the entry source for %CALENDAR%, the dynamic entries will only be displayed when you use %CALENDAR% directly in the same document. If you use it from another document or include the document, the dynamically generated entries will not be seen.

Example
  • WebLeftBarExample has
    %CALENDAR{topic="CalendrierActivites" web="Main"}%
    
  • WebHome has
    %CALENDAR{topic="CalendrierActivites" aslist="1" days="30" datenumberformat="   * $year-$mo-$day"}%
    
  • CalendrierActivites? has
       * 1 Wed - [[http://linux-neuchatel.he-arc.ch][linux-ne]]
    %SEARCH{ "^Activite[A-Z0-9]"
                         scope="topic"
                         web="%WEB%"
                         regex="on" nosearch="on" nototal="on" order="modified" reverse="on" limit="100"
                         format="   * $formfield(EventDate) - [[$web.$topic][$formfield(ShortTitle)]]"
    }%
    %CALENDAR{topic="CalendrierActivites" web="Main"}%
    

Results
  • only CalendrierActivites? when seen directly has all of the entries

(http://www.alphanet.ch:8080/cgi-bin/foswiki/view/Main/WebHome for live example)
Had to fix this so I could include calendars from external sources.

-- CrawfordCurrie - 30 Jun 2010

ItemTemplate edit

Summary CalendarPlugin issues when included
ReportedBy MarcSCHAEFER
Codebase 1.0.4
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component CalendarPlugin
Priority Normal
CurrentState Waiting for Release
WaitingFor
Checkins Foswikirev:7982
TargetRelease n/a
ReleasedIn
Topic revision: r3 - 30 Jun 2010 - 11:59:25 - CrawfordCurrie
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads