There haven't been any comments on this, so I thought I'd check back to see if anyone had any thoughts on how to address this issue without modifying pmwiki.php directly.<br><br>Thanks,<br>Kurt<br><br><div><span class="gmail_quote">
On 11/8/06, <b class="gmail_sendername">Kurt Devlin</b> &lt;<a href="mailto:kurt.devlin@gmail.com">kurt.devlin@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I know this is not recommended, but I wound up addressing this issue by updating the EditTemplate function in pmwiki.php. I've bolded the lines that I added below. Is there an easy way to incorporate this in a cookbook recipe or 
config.php or can this be added as an option to the core PmWiki functionality? Also, I tried to just redirect this request to Site.PageNotFound, but couldn't get it to work. Any ideas on getting that working would be appreciated too.
<br><br><span style="font-family: courier new,monospace;"># EditTemplate allows a site administrator to pre-populate new pages</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">

# with the contents of another page.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">function EditTemplate($pagename, &amp;$page, &amp;$new) {</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">&nbsp; global $EditTemplatesFmt;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp; if (@$new['text'] &gt; '') return;</span>

<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp; if (@$_REQUEST['template'] &amp;&amp; PageExists($_REQUEST['template'])) {</span><br style="font-family: courier new,monospace;">

<span style="font-weight: bold; font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; $rc = FmtPageName('$Group.RecentChanges', $pagename);</span><br style="font-weight: bold; font-family: courier new,monospace;"><span style="font-weight: bold; font-family: courier new,monospace;">

&nbsp;&nbsp;&nbsp; if (PageExists($rc)) {</span><br style="font-weight: bold; font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $p = RetrieveAuthPage($_REQUEST['template'], 'read', false,</span>

<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; READPAGE_CURRENT);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($p['text'] &gt; '') $new['text'] = $p['text']; </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">&nbsp;</span><span style="font-weight: bold; font-family: courier new,monospace;">&nbsp;&nbsp; }</span><br style="font-weight: bold; font-family: courier new,monospace;"><span style="font-weight: bold; font-family: courier new,monospace;">

&nbsp;&nbsp;&nbsp; else {</span><br style="font-weight: bold; font-family: courier new,monospace;"><span style="font-weight: bold; font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $new['text'] = &quot;The requested group does not exist.\n\nCreating a new group based on a template is not allowed.\n\nPlease check that you didn't include an unintentional dot (.) or slash (/) in your link name.&quot;;
</span><br style="font-weight: bold; font-family: courier new,monospace;"><span style="font-weight: bold; font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;</span><br style="font-weight: bold; font-family: courier new,monospace;">

<span style="font-weight: bold; font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp; </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp; }</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">&nbsp; foreach((array)$EditTemplatesFmt as $t) {</span><br style="font-family: courier new,monospace;"><span style="font-weight: bold; font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; $rc = FmtPageName('$Group.RecentChanges', $pagename);
</span><br style="font-weight: bold; font-family: courier new,monospace;"><span style="font-weight: bold; font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; if (PageExists($rc)) {</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $p = RetrieveAuthPage(FmtPageName($t,$pagename), 'read', false,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; READPAGE_CURRENT);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (@$p['text'] &gt; '') { $new['text'] = $p['text']; return; }</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">&nbsp;</span><span style="font-weight: bold; font-family: courier new,monospace;">&nbsp;&nbsp; }</span><br style="font-weight: bold; font-family: courier new,monospace;"><span style="font-weight: bold; font-family: courier new,monospace;">

&nbsp;&nbsp;&nbsp; else {</span><br style="font-weight: bold; font-family: courier new,monospace;"><span style="font-weight: bold; font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $new['text'] = &quot;The requested group does not exist.\n\nCreating a new group based on a template is not allowed.\n\nPlease check that you didn't include an unintentional dot (.) or slash (/) in your link name.&quot;;
</span><div><span class="e" id="q_10ec89c48d3b45c7_1"><br style="font-weight: bold; font-family: courier new,monospace;"><span style="font-weight: bold; font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp; </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">
&nbsp; }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">}</span><br><br><div><span class="gmail_quote">On 11/7/06, <b class="gmail_sendername">Crisses</b> &lt;<a href="mailto:crisses@kinhost.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

crisses@kinhost.org</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hey, Kurt,<br><br>I'm sorry to see no one picked up your post and responded.&nbsp;&nbsp;I'll give
<br>it a go, but I don't really know a good answer....&nbsp;&nbsp;maybe if I ask<br>the right questions it will help :)<br><br>On Nov 6, 2006, at 10:51 AM, Kurt Devlin wrote:<br><br>&gt; I have a good number of novice users that are creating pages
<br>&gt; dealing with the XML content that they work with. Unfortunately, a<br>&gt; lot of the XML elements follow a dot separated naming convention.<br>&gt; This does not translate well to wiki page creation. If have a lot
<br>&gt; of situations where users create a page like &quot;Unhandled Case in<br>&gt; para.text Element&quot;. Instead of creating the desired page, this<br>&gt; creates a &quot;Text Element&quot; in the wayward group, &quot;Unhandled Case In
<br>&gt; Para&quot;. To combat this, I created a custom Site/PageNotFound page<br>&gt; (see below) that tries to determine if the group in the page<br>&gt; request exists or not. If the group doesn't appear to exist, it<br>

&gt; generates additional warnings.<br>&gt;<br>&gt; My problem is that this approach does not work if the user is<br>&gt; creating a page that is generated from a template. This happens off<br>&gt; of the Issues page in MyGroup (see local/MyGroup.Issues.php below).
<br>&gt; In this case, there is no checking that happens, so my users can<br>&gt; create new groups without warning.<br><br>I don't understand what you mean by generated by a template.<br><br>Are you using a recipe to generate pages by a template?&nbsp;&nbsp;Or are you
<br>using the PmWiki ability to set a new page to have a template within<br>a group?<br><br>&gt; My questions are:<br>&gt; Is there a way to add PageNotFound functionality to pages created<br>&gt; from templates?<br>&gt; Is there an easier way to check the existence of a group besides
<br>&gt; &quot;(:if ! [ exists {$Group}.{$Group} or exists {$Group}.HomePage ] :)&quot;?<br><br>You can check in config.php rather than in a wiki page...<br><br>&gt; Is there an easy way to identify the user adding the new page and
<br>&gt; do conditional processing based on their name?<br><br>perhaps:<br>(:if equal {$Author} &quot;Name&quot; :)<br><br>&gt; local/MyGroup.Issues.php<br>&gt; &lt;?<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; $LinkPageCreateFmt = &quot;&lt;a class='createlinktext'
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; href='\$PageUrl?action=edit&amp;amp;template= Site.IssuesTemplate'&gt;\<br>&gt; $LinkText&lt;/a&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;a class='createlink' href='\$PageUrl?<br>&gt; action=edit&amp;amp;template=Site.IssuesTemplate

'&gt;?&lt;/a&gt;&quot;;<br>&gt; ?&gt;<br><br>Is this where you're defining the template you mentioned?<br><br>Crisses<br></blockquote></div><br>

</span></div></blockquote></div><br>