Item13487: Nat skin 404 page create link doesn't pass QUERYSTRING breaking functionality
Priority: Urgent
Current State: Confirmed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: NatSkin
Branches:
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