[pmwiki-users] PmWiki with WikiForms as quality managment documentation database - minor problems
John Rankin
john.rankin at affinity.co.nz
Thu Sep 21 16:52:58 CDT 2006
On Friday, 22 September 2006 1:21 AM, Henning Ruch \(DHL DE\) <Henning.Ruch at dhl.com> wrote:
>Hi everyone,
>
>3) There is a problem in the interaction between password
>protection and WikiForms date fields. This only occurrs if the user is not
>yet authorized upon editing the page and thus gets the password
>request right then. This results in a PHP error message and the
>content of the date field being ignored. I have circumvened
>that for the moment by using a text field for the date right now, but
>I'm certain that will lead to dates being entered in different
>formats, with the inevitable impact on sortability. (I'm
>PHP-illiterate - maybe the interaction problem is not a
>difficult one, but I've not been able to figure it out myself.)
I think thius is a bug in the forms code. Could you try something
for me:
In wikiform.php, look for function EntryForm:
function EntryForm($pagename,$action,$method,$FormPageFmt,$opt=NULL) {
global $FormTitleFmt, $FmtP, $Now;
$f = FormFields($pagename,$FormPageFmt);
if (@$FormTitleFmt['title']) $out[] =
MarkupToHTML($pagename, '!%block class=wikiaction%' . $FormTitleFmt['title']);
$pageaction = "action='\$ScriptUrl'";
if ($action=='posteform') $pageaction = '';
elseif ($action=='saveeform') {
$pageaction = "action='\$PageUrl'";
if (PageExists($pagename)) {
$editing = true;
$fve = FormValues($pagename,$f); // this is the culprit I think!!
foreach ($fve as $k => $v) $$k = $v;
} else $FmtP['/\\$LastModified/e'] = '$GLOBALS[\'CurrentTime\']';
} elseif ($action=='neweform') $action = 'posteform';
...
Change the 'culprit' line to
$fve = FormValues($pagename,$f,'edit');
That might fix the problem.
If it does, let me know and I'll update the code.
>
>5) Trying to keep things as simple as possible for the users, I
>tried to provide the "Attach:" markup as a default entry for their
>WikiForms, but found that WikiForms does not store field data
>if I provide defaults. (I stated in my bug report in the cookbook that
>wiped fields result from using the attach markup, but have
>since found that any use of defaults seems to have this effect, including
>the use of a simple "1" for the document version number.)
I'm not sure I understand exactly what you mean. Could you send me a
link to an example. AFAIK, default values work as specified (which
may not be what you want). I use this feature all the time.
For example:
http://www.wikipublisher.org/wiki/index.php?n=Issues.NewIssue
You will see the default text in the first field. Press Submit and
you will see the default text in the preview.
Please do *not* Save, as this is a live system.
--
JR
--
John Rankin
More information about the pmwiki-users
mailing list