This question about Configuration: Answered

Bram van Oosterhout

I have a topic (WebHome) in a subweb (Sandbox/Webs)

Sandbox/Webs.WebHome contains a wiki word TopicA. TopicA does not exist in Sandbox/Webs. TopicA is rendered appropriately as to be created.

The rendered link is incorrect: http://cdl/devwiki/bin/edit/Webs/TopicOne?topicparent=Sandbox/Webs.WebHome. The web does not exists. It should be Sandbox/Webs

I traced this to line 70-72
     70 use constant DEFAULT_NEWLINKFORMAT => <<'NLF';
     71 <span class="foswikiNewLink">$text<a href="%SCRIPTURLPATH{"edit"}%/$web/$topic?topicparent=%WEB%.%TOPIC%" rel="nofollow" title="%MAKETEXT{"Create this topic"}%">?</a></span>
     72 NLF

In line 1080-1089=it appears that this may be substituted via a NEWLINKFORMAT preference. But that has very limited application.
   1080 # Get the template for a "new topic" link
   1081 sub _newLinkFormat {
   1082     my $this = shift;
   1083     unless ( $this->{NEWLINKFORMAT} ) {
   1084         $this->{NEWLINKFORMAT} =
   1085           $this->{session}->{prefs}->getPreference('NEWLINKFORMAT')
   1086           || DEFAULT_NEWLINKFORMAT;
   1087     }
   1088     return $this->{NEWLINKFORMAT};
   1089 }
Is there a way I can configure the correct behaviour, or is this a bug to be fixed?

-- BramVanOosterhout - 21 Jan 2020

What's your setting for NEWLINKFORMAT?

-- MichaelDaum - 21 Jan 2020

Here what SHOWPREFERENCE gives"
Set NEWLINKFORMAT = "<a class="foswikiNewLink" href="%SCRIPTURLPATH{"edit"}%/$web/$topic?topicparent=%ENCODE{"%WEB%.%TOPIC%"}%" rel="nofollow" title="%MAKETEXT{"Create this topic"}%">$text</a>"

    NEWLINKFORMAT was defined in System.DefaultPreferences 

-- BramVanOosterhout - 21 Jan 2020

Hm, I tried this on my local install and cannot reproduce the described error.

-- MichaelDaum - 21 Jan 2020

I'll upgrade to 2.1.6 and verify.

-- BramVanOosterhout - 21 Jan 2020

Yes, it works correctly in a fresh install of 2.1.6.

I'll close this question. Thanks for checking.

-- BramVanOosterhout - 21 Jan 2020

QuestionForm edit

Subject Configuration
Version Foswiki 2.1.4
Status Answered
Related Topics
Topic revision: r5 - 21 Jan 2020, BramVanOosterhout
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy