You are here: Foswiki>Tasks Web>Item2343 (10 Nov 2009, MichaelDaum)Edit Attach

Item2343: Calling macro from an other web via topic= doesn't work

Priority: Normal
Current State: Closed
Released In:
Target Release: n/a
Applies To: Extension
Component: EasyMacroPlugin
Reported By: RalfKrueger
Waiting For:
Last Change By: MichaelDaum
Thank you very much for this fantastic plugin: That realy rocks!
Everthing works fine, but I'm not able to call macros from an other web via topic=-Parameter.

I logged in as admin in the foswiki raw image machine and defined the following:

1. System.IncludeTestSystem
---+ IncludeTestSystem
System.IncludeTestSystem: *%var1%*

%REGISTERMACRO{"INCLUDETESTSYSTEM" param="var1" var1="Default1"}%

2. Main.SitePreferences
   * Set EASYMACROS = System.IncludeTestSystem, Main.IncludeTest2, Main.IncludeTest3

3. Main.EasyMacroPluginTest
---++ Makro-Call from System-Web

  • On Page Main.EasyMacroPluginTest nothing appears.
  • Macro's that are defined in the Main-Web works fine!
  • When I create a topic System.EasyMacroPluginTest as described in 3. the macro works fine!
  • When I use the format= instead of topic= in the %REGISTERMACRO% the macro can used from every web!
How can I use macros defined in other web's with the topic-parameter?

And a additional question: On all macro-topics I get a message: "ERROR: can't redefine INCLUDETEST2" from the %REGISTERMACRO%, but the macro works fine.

-- RalfKrueger - 09 Nov 2009

Trying out your example.

-- MichaelDaum - 10 Nov 2009

Fixed and released as v1.11. Note that you might have to revisit your configure (or LocalSite.cfg) and correct the settings from
$Foswiki::cfg{EasyMacroPlugin}{Registration} = '%INCLUDE{"$topic" section="registration"}%';
$Foswiki::cfg{EasyMacroPlugin}{Execute} = '%INCLUDE{"$topic" warn="off" $params}%';


$Foswiki::cfg{EasyMacroPlugin}{Registration} = '%INCLUDE{"$web.$topic" section="registration"}%';
$Foswiki::cfg{EasyMacroPlugin}{Execute} = '%INCLUDE{"$web.$topic" warn="off" $params}%';

-- MichaelDaum - 10 Nov 2009

ItemTemplate edit

Summary Calling macro from an other web via topic= doesn't work
ReportedBy RalfKrueger
Codebase 1.0.7
SVN Range Foswiki-1.0.7, Sun, 20 Sep 2009, build 5061
AppliesTo Extension
Component EasyMacroPlugin
Priority Normal
CurrentState Closed
Checkins EasyMacroPlugin:1de0abc240b4
TargetRelease n/a
Topic revision: r2 - 10 Nov 2009, MichaelDaum
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