[pmwiki-users] wiki forms and pwd

John Rankin john.rankin at affinity.co.nz
Tue Sep 12 00:36:59 CDT 2006


On Tuesday, 12 September 2006 7:15 PM, Sergio Andreozzi <sergio.andreozzi at cnaf.infn.it> wrote:
>Hi,
>
>I've an issue about wiki forms and password protected pages.
>
>This is the set up:
>
>1. group page protected by password
>2. wiki form used in this group for managing a set of requirements
>3. direct form editing enabled from table  (page=form used)
>
>if I'm not logged in and I access a page from the table by clicking on 
>the column page, I'm redirected to a form related to the selected item. 
>When I modify it and I click on "submit", I get the following set of 
>warning and the log in process fails:
>
>Warning: implode(): Bad arguments. in /pathto/wiki/cookbook/wikiform.php 
>on line 444
>
>Warning: Cannot modify header information - headers already sent by 
>(output started at /pathto/wiki/cookbook/wikiform.php:444) in 
>/pathto/wiki/pmwiki.php on line 884
>
>
>any idea?
>
>thanks, Sergio
>
Sounds like a bug. Try the following. Edit wikiform.php and in
function EntryForm look near the top for

        if (PageExists($pagename)) {
            $editing = true;
            $fve = FormValues($pagename,$f);


Change this to

        if (PageExists($pagename)) {
            $editing = true;
            $fve = FormValues($pagename,$f,'edit');

What this should do is force a password prompt before it loads 
the data into the editing form.

I haven't tried this, so let me know what happens.

Can you also tell me what line 444 is in your version? I think it's
in the function FormData, but this contains several implode calls.

You could also try adding "echo $f[$i]['element'];" immediately
above line 444, to see what it thinks it's trying to implode. That
may give us a clue.

Do I understand that if you *are* logged in, it works correctly?
-- 
JR
--
John Rankin







More information about the pmwiki-users mailing list