cross
New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists
You are here: Foswiki>Tasks Web>Item13487 (04 Dec 2017, MichaelDaum)Edit Attach

Item13487: Nat skin 404 page create link doesn't pass QUERYSTRING breaking functionality

pencil
Priority: Urgent
Current State: Confirmed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: NatSkin
Branches:
Reported By: JohnRouillard
Waiting For:
Last Change By: MichaelDaum
I am using NatSkin to create a Foswiki that acts as a knowledge base from another application (Nagios).

As part of that we have specific template and parent page requirements that are passed to foswiki when the pages are created:

E.G.

https://www.example.com/foswiki/bin/view/NagiosWeb/NagHostcook-02?topicparent=NagHostIndex&templatetopic=NagHostTemplate&nowysiwyg=1&host=cook-02&alias=data-03

When using the pattern skin. These parameters are filled in on the form that is displayed when the page doesn't exist. So the user just creates the page and we are done.

When using the same url with the NatSkin the query params aren't preserved in the create link, so the user ends up at an empty page (no template text) that is also missing the parent setting.

Can somebody please apply the following patch and re-release NatSkin.

In 404.nat.tmpl please change the existing create::action definition to include the %QUERYSTRING%
%TMPL:DEF{"create::action"}%<tr>
<th>%BUTTON{"%MAKETEXT{"Create"}%" class="simple" icon="page_white_add" href="%\
SCRIPTURLPATH{"edit"}%/%WEB%/%TOPIC%?t=%GMTIME{"$epoch"}%&%QUERYSTRING%"}%</th>
<td>%MAKETEXT{"The page might be missing but it shouldn't."}%</td>
</tr>%TMPL:END%

Note QUERYSTRING may be empty and the url will have a trailing &. AFAIK this isn't an issue but if it is some additional macro trickery may be needed to remove the trailing &.

Thanks.

-- JohnRouillard - 30 Jun 2015

 

ItemTemplate edit

Summary Nat skin 404 page create link doesn't pass QUERYSTRING breaking functionality
ReportedBy JohnRouillard
Codebase trunk
SVN Range
AppliesTo Extension
Component NatSkin
Priority Urgent
CurrentState Confirmed
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release02x01Checkins
Release02x00Checkins
Release01x01Checkins
Topic revision: r2 - 04 Dec 2017, MichaelDaum - This page was cached on 17 Sep 2018 - 21:30.

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