Item9610: The short list of macros that are expanded in templates, e.g. URLPARAM, are lost when copying a topic
Priority: Urgent
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component:
Branches:
Try to coping a topic containing something like
* Set DOIT = %URLPARAM{"doit"}%
The copy will have
* Set DOIT =
This easily destroys your wiki apps.
--
MichaelDaum - 03 Sep 2010
I can confirm the bug. It is also in 1.0.9.
The copy function has mistakenly been implemented so it creates the copy based on the original as a template. But that does not create a copy. It will expand the macros that are expanded in topic templates.
I will look at little more at this.
--
KennethLavrsen - 05 Sep 2010
I have added a new option "notemplateexpansion" for the edit script. This is now used for the copy feature.
It is not only URLPARAM that is expanded but any of the macros that are expanded from template topics when creating a new topic.
I tried to find an existing unit test to add this case to but there is no existing unit tests for the edit script and I do not have the time to spend a full weekend making one myself. So I will close this just with the bug fixed.
If someone else will create a unit test - be my guest. It should then also confirm that the right list of macros are expanded from templates when creating new topic.
--
KennethLavrsen - 05 Sep 2010