r6 - 30 Nov 2004 - 19:34:03 - KarenAikenYou are here: TWiki >  Codev Web > WebformInitialValueOnlyWorksWithTemplate
Tags:
, create new tag

Bug: Creation of Topic with Webform - Initial values are only assigned if Form is bound to TopicTemplate

Adding a Topic by using a form pointing to the edit script ignores Webform values if the TopicTemplate? doesn't contain the specified webform

Test case

About this test case form
  • Uses topictemplate = Templates.ModuleTopicTemplate?
    This topic does not exists, so I think it somehow defaults to use WebTopicEditTemplate
  • Does not use formtemplate
-- NielsKoldso - 13 Nov 2004
WikiWord Thopic to create
TopicSummary transferred to
form metadata
as cgi parameter
 
If the WebTopicEditTemplate doesn't contain the webform (BasicForm) already the TopicClassification value is ignored.

After rechecking the problem i found out, that in any cases i add the formtemplate parameter to the url the formvalues are ignored and set to form defaults.

Without knowing the code i guess that there is something with the formchange logic. If you change the form the values are wiped out and i guess that the new values are wiped out while the form is added.

MartinCleaver thankfully helped me finding this bug. We worked together in IRC. See http://koala.ilog.fr/twikiirc/bin/irclogger_log/twiki?date=2004-10-21,Thu&sel=123#l119 for detail on the conversation.

Environment

TWiki version: TWikiRelease01Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Linux
Web server: Apache
Perl version: 5.6.1
Client OS: Linux
Web Browser: Mozilla

-- ChristianKalkhoff - 21 Oct 2004

Follow up

Is anybody looking at this?

I have pooked around in Beijing save script and Cairo Save.pm trying to spot why it works in Beijing and not in Cairo.

I have not suceeded - too much a novice when it comes to TWiki core programs frown

I cannot migrate to Cairo before this is fixed, so I have chosen to use the workaround presented above
- thanx a lot for supplying it ChristianKalkhoff and MartinCleaver smile

Workaround:

Rewrite all TWiki topic creation apps:
from
  ...
  <input  type="hidden" name="formtemplate"  value="FooForm" />
  <input  type="hidden" name="templatetopic" value="FooTopicTemplate"/> 
  ...

to

  ...
  <input  type="hidden" name="Xformtemplate"  value="FooForm" /> <!-- Bug in Cairo: make sure FooTopicTemplat contains FooForm -->
  <input  type="hidden" name="templatetopic" value="FooTopicTemplate"/> 
  ...

Downside: You cannot categorize your template topics with (say) your TopicTemplateForm - because it (in the above example) has to be a FooForm

-- NielsKoldso - 13 Nov 2004

Fix record

WebForm
TopicClassification BugReport
TopicSummary Adding a Topic by using a form pointing to the edit script ignores Webform values if the TopicTemplate? doesn't contain the specified webform
InterestedParties NielsKoldso, KarenAiken
AssignedTo

AssignedToCore

ScheduledFor

RelatedTopics WebformInitialValueNotSaved
SpecProgress

ImplProgress

DocProgress

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r6 < r5 < r4 < r3 < r2 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo