• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item5101: templatetopic and forms do not understand subwebs

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal New   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

I created a subweb: Friends/Vicki/Recipes.

In that subweb, I put a template, NewRecipeTemplateStrict, a TWiki Form, NewRecipeForm, and an HTML form to create a new page:

<form name="new" action="%SCRIPTURLPATH%/edit%SCRIPTSUFFIX%/%INTURLENCODE{"%WEB%"}%">
     <input type="hidden" name="action" value=form" />
     <input type="hidden" name="topicparent" value="WebHome" />
     <input type="hidden" name="onlynewtopic" value="on" />
     <input type="hidden" name="templatetopic" value="NewRecipeTemplateStrict" />
     <input type="hidden" name="topic" value="RecipeXXXXXXXXXX" />

     <input type="submit" value="Create" />
</form>

When I clicked the "Create" button, I got an error message:

Attention

"Friends/Vicki.NewRecipeTemplateStrict" topic does not exist
You are trying to templatetopic a topic that does not exist.

When I fixed that problem, the new page was created in the Friends/Vicki sub (not the Recipes subweb) and the form was "not available".

Workaround

<form name="new" action="%SCRIPTURLPATH%/edit%SCRIPTSUFFIX%/%INTURLENCODE{"%WEB%"}%">
     <input type="hidden" name="action" value=form" />
     <input type="hidden" name="topicparent" value="%WEB%.WebHome" />
     <input type="hidden" name="onlynewtopic" value="on" />
     <input type="hidden" name="templatetopic" value="%WEB%.NewRecipeTemplateStrict" />
     <input type="hidden" name="topic" value="%WEB%.RecipeXXXXXXXXXX" />

     <input type="submit" value="Create" />
</form>

Problem

Apparently, "templatetopic" and "topic" URL parameters need to be fully qualified. Unlike most topic names, they aren't assumed to be in the "current" subweb. Most odd.

-- TWiki:Main/VickiBrown - 09 Dec 2007

ItemTemplate
Summary templatetopic and forms do not understand subwebs
ReportedBy TWiki:Main.VickiBrown
Codebase

SVN Range TWiki-4.3.0, Sun, 25 Nov 2007, build 15790
AppliesTo Engine
Component

Priority Normal
CurrentState New
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Topic revision: r1 - 2007-12-09 - VickiBrown
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback