Tags:
create new tag
view all tags

Bug: When creating a page using the save script, form field values are not set by passed parameters

When creating a new page using an html form which submits to the save script, and the new page is to include a form, form variable passed to the new page as cgi parameters are not taken into account

Test case

action %SCRIPTURLPATH%/save%SCRIPTSUFFIX%/Sandbox/
topic
templatetopic
sampletext
TopicClassification
Textfield
onlynewtopic

Environment

TWiki version: TWikiRelease01Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin, TreePlugin
Server OS: linux
Web server: Apache/2.0.40 (Red Hat Linux)
Perl version: 5.8.0
Client OS: Windows 2000
Web Browser: IE 5.5

-- KarenAiken - 30 Nov 2004

Follow up

I edited line 136 in Save.pm:

#TWiki::Form::fieldVars2Meta( $webName, $query, $meta ) unless $templatetopic;
TWiki::Form::fieldVars2Meta( $webName, $query, $meta );

With that change, these now work for creating a new page with the save script (which covers off everything I need it to do smile ):

  • Specify a templatetopic that has a form attached with default values; don't specify formtemplate; pass values to new page which override default values
  • Specify a templatetopic that has a form attached with default values; also specify formtemplate of attached form; pass values to new page which override default values
  • Specify a templatetopic that has no form attached; also specify formtemplate; pass values to new page which set form values

But this is now broken frown :

  • Specify a templatetopic that has a form attached with default values; don't specify formtemplate; don't pass values to new page: new page winds up with no values in the form

-- KarenAiken - 30 Nov 2004

Fix record

Topic revision: r1 - 2004-11-30 - KarenAiken
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.