Foswiki General Assembly will be held on 12th December 2019, 1200 UTC on Freenode IRC channel #foswiki-association. See AgendaTenthGeneralAssembly

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
Reported By: MichaelDaum
Waiting For:
Last Change By: KennethLavrsen
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
Priority Urgent
CurrentState Closed
Checkins distro:3882d5a926af
TargetRelease minor
ReleasedIn 1.1.0
Topic revision: r6 - 04 Oct 2010, KennethLavrsen - This page was cached on 10 Dec 2019 - 18:33.

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