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

Item5412: "You are trying to templatetopic a topic that does not exist" makes no sense

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Closed   patch  

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


When you create a new topic from a template that does not exist, what should the message be?

-- TWiki:Main.ArthurClemens - 03 Mar 2008

"You are trying to create a topic using a templatetopic that does not exist" would be my best proposal

-- TWiki:Main.KennethLavrsen - 03 Mar 2008

in messages.tmpl

---++ %MAKETEXT{"[_1] topic does not exist" args="\"%WEB%.%TOPIC%\""}%
%MAKETEXT{"You are trying to [_1] a topic that does not exist." args="%PARAM1%"}%

---++ %MAKETEXT{"If you want to create the topic"}%
[[%SCRIPTURLPATH{"edit"}%/%WEB%/%TOPIC%?t=%SERVERTIME{"$year$mo$day$min$sec"}%][%MAKETEXT{"Create the topic"}%]].

%MAKETEXT{"Contact [_1] if you have any questions." args="%WIKIWEBMASTER%"}%

Which is then used in TWiki::UI::Edit

             unless( $store->topicExists( $templateWeb, $templateTopic )) {
                throw TWiki::OopsException(
                    def => 'no_such_topic',
                    web => $templateWeb,
                    topic => $templateTopic,
                    params => [ 'templatetopic' ] );


     if( $templatetopic ) {
        ( $templateweb, $templatetopic ) =
          $session->normalizeWebTopicName( $templateweb, $templatetopic );

        unless( $store->topicExists( $templateweb, $templatetopic )) {
            throw TWiki::OopsException(
                def => 'no_such_topic',
                web => $templateweb,
                topic => $templatetopic,
                params => [ 'template from' ] );


     unless( $session->{store}->topicExists( $oldWeb, $oldTopic )) {
        # Item3270: check for the same name starting with a lower case letter.
        unless( $session->{store}->topicExists( $oldWeb, lcfirst $oldTopic )) {
            throw TWiki::OopsException(
                def => 'no_such_topic',
                web => $oldWeb,
                topic => $oldTopic,
                params => [ 'rename' ] );
        $oldTopic = lcfirst $oldTopic;

and TWiki::UI

 sub checkTopicExists {
    my ( $session, $webName, $topic, $op ) = @_;
    ASSERT($session->isa( 'TWiki')) if DEBUG;

    unless( $session->{store}->topicExists( $webName, $topic )) {
        throw TWiki::OopsException( 'accessdenied',
                                    def => 'no_such_topic',
                                    web => $webName,
                                    topic => $topic,
                                    params => [ $op ] );

.... The case that Arthur reports is the one in TWiki::UI::Edit, but it feels to me like the others could also do with a little improvement.

HOWEVER the parameters to the MAKETEXTs are not translated, are they - which makes the entire thing a wee bit awkward.

-- TWiki:Main.SvenDowideit - 03 Apr 2008

It would make more sense to have a number of complete and translatable variations.

-- TWiki:Main.ArthurClemens - 03 Apr 2008

Done like this. Let's not forget to ask the translators to translate the new messages.

-- TWiki:Main.ArthurClemens - 03 May 2008

Summary "You are trying to templatetopic a topic that does not exist" makes no sense
ReportedBy TWiki:Main.ArthurClemens

SVN Range TWiki-5.0.0, Wed, 23 Jan 2008, build 16283
AppliesTo Engine

Priority Normal
CurrentState Closed

Checkins TWikirev:16763 TWikirev:16764
TargetRelease patch

Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r8 - 2008-08-04 - KennethLavrsen
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback