Foswiki on GitHub is open for business! Next release meeting: Monday October 13, 1300Z

Item9610: The short list of macros that are expanded in templates, e.g. URLPARAM, are lost when copying a topic

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Urgent Closed Engine    
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

 

ItemTemplate edit

Summary The short list of macros that are expanded in templates, e.g. URLPARAM, are lost when copying a topic
ReportedBy MichaelDaum
Codebase 1.0.9, trunk
SVN Range
AppliesTo Engine
Component
Priority Urgent
CurrentState Closed
WaitingFor
Checkins distro:3882d5a926af
TargetRelease minor
ReleasedIn 1.1.0
Topic revision: r6 - 04 Oct 2010, KennethLavrsen
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License