Item11924: Issues Using Template with Link Brackets containing macros
Priority: Normal
Current State: Duplicate
Released In: n/a
Target Release: n/a
It appears that if you have macros within a link bracket as a template, then the topic is not created as expected from the template.
For example, the template contains a session variable within the link brackets.
[[]]
When you create the topic using the template, the linkage within the topic is parsed incorrectly.
I have a template with two examples – one using the session variable and the other using the CALC function to set a variable.
In some cases not shown, it simply strips the % sign off the CALC function that I have within the brackets.
We are currently using Foswiki-1.1.5. Don’t recall having this issue in our previous release 1.1.4
Any ideas appreciated.
Here is the topic that utilizes the template
---++ Bracket Test Topic
_This topic sets a session variable, then creates a topic using a template with the session variable inside brackets._
%SESSION_VARIABLE{"AnyLink" set="anyName"}%
<form name="new" action="%SCRIPTURLPATH{"edit"}%/%WEB%/">
<input type="hidden" name="topic" value="BracketTopicAUTOINC01" />
<input type="hidden" name="templatetopic" value="BracketTestTopicTemplate" />
<input type="hidden" name="onlywikiname" value="on" />
<input type="hidden" name="onlynewtopic" value="on" />
<input type="submit" class="foswikiSubmit" value="Create" /></form>
Here is the template used
---+ Template with % inside double brackets
* Here is the session variable previously set - %SESSION_VARIABLE{"AnyLink"}%
* Here it is inside the brackets - [[%SESSION_VARIABLE{"AnyLink"}%][My New Topic]]
_Here is an another example - macro set then used_
%CALC{"$SET(TestVariable, AnotherTest )"}%
* Another example - [[%CALC{"$GET(TestVariable)"}%][My New Topic]]
--
JoeMarandola - 04 Jun 2012
Does this happen with the plain text editor as well as the Wysiwyg editor?
Have you upgraded
WysiwygPlugin since installing 1.1.5. I'm not recommending that necessarily, just wondering which version of
WysiwygPlugin you might be using.
- Version 1.1.5 shipped with Foswiki 1.1.5, and has some significant issues perserving whitespace
- Versions 1.1.6 - 1.1.9 (testing) and 1.1.10 - 1.1.11 had among other things, changes to improve link handling, but may corrupt macros inside links.
- Version 1.1.12 hopefully fixed the macro corruption issue, and has one issue caused by a change to the \ table row continuation syntax.
Can you try to recreate the problem on
http:\\trunk.foswiki.org\Sandbox\WebHome - this is running the
WysiwygPlugin with all the latest fixes.
(I've tested this locally with the 1.1.13 version of
WysiwygPlugin (also installed on trunk) and it seems to work correctly)
--
GeorgeClark - 04 Jun 2012
Thanks, George,
I ran the test in the sandbox and it worked fine. No I have not upgraded
WysiwygPlugin, I just checked and have 1.1.10. So I will update to 1.1.12 since we really need this correction.
Is there a task Item for the \table row continuation? I don't think it would effect me since I don't recognize this - but to make sure.
--
JoeMarandola - 04 Jun 2012
Table row continuation issue is
Item11915
--
GeorgeClark - 04 Jun 2012
Updated
WysiwygPlugin to 1.1.12 and problem is solved.
--
JoeMarandola - 04 Jun 2012