Item2343: Calling macro from an other web via topic= doesn't work
Priority: Normal
Current State: Closed
Released In:
Target Release: n/a
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
%STARTINCLUDE%
System.IncludeTestSystem: *%var1%*
%STOPINCLUDE%
%STARTSECTION{"registration"}%
%REGISTERMACRO{"INCLUDETESTSYSTEM" param="var1" var1="Default1"}%
%ENDSECTION{"registration"}%
2.
Main.SitePreferences
...
* Set EASYMACROS = System.IncludeTestSystem, Main.IncludeTest2, Main.IncludeTest3
...
3.
Main.EasyMacroPluginTest
---++ Makro-Call from System-Web
%INCLUDETESTSYSTEM%
Result:
- 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}%';
to
$Foswiki::cfg{EasyMacroPlugin}{Registration} = '%INCLUDE{"$web.$topic" section="registration"}%';
$Foswiki::cfg{EasyMacroPlugin}{Execute} = '%INCLUDE{"$web.$topic" warn="off" $params}%';
--
MichaelDaum - 10 Nov 2009