Create a topic template, let's say BlogTemplate, and
add a topic preference
Set VIEW_TEMPLATE = BlogView
via
"Edit topic preference settings" on the More-page to it.
When creating a NewBlogEntry using the BlogTemplate it will
not have the
VIEW_TEMPLATE
topic preference.
This is an interesting bug: the edit script does not pass metadata other than form fields, as no other metadata can be edited in the edit application. However, when we create a topic using edit and passing it a templatetopic parameter, we would expect that all information in the templatetopic ends up in the created page. Not so. No metadata other than the form data is taken from the templatetopic.
Note that in
Edit.pm
there is even code to update the topic parent, but this also has no effect for the same reason.
This seems incorrect behavior to me, and based on the code attempting to update topic parent from the template, it is not intended. Luckily enough this is easily fixed. --
TW
Fixed. Added test case to
SaveScriptTests. (Note that currently
simpleFormSave2(SaveScriptTests)
is failing, independently of this change.) In SVN 6082. --
TW
This is still / again a problem. Maybe
Item1881 is related. --
OK
SaveScriptTests::test_templateTopicWithMeta does not fail, because it only tests the direct save (
bin/save/Myweb/MyTopic?templatetopic=MyTemplate&action=save
). The error occurs, when you manually go through the edit-save-cycle. --
OK
No way is this urgent, if it can sit here this long without anyone kicking up a fuss. Regrading to Normal.
CC
Gawd, I found it.
MD