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
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
--
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
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
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