[pmwiki-users] Simple Forum -- Can't create new posts

Hans design at softflow.co.uk
Sun Jan 29 03:32:34 CST 2006


Sunday, January 29, 2006, 2:30:56 AM, Patrick wrote:
> On Sun, Jan 29, 2006 at 12:15:59AM +0000, Hans wrote:
>> After a series of trial and error tests on my local site
>> (pmwiki 2.1.beta21) i found that having (:commentboxchrono:) in the
>> Groupfooter will not post to a not-yet created page if the markup is
>> just by itself. Wrap it into a division and it works fine. Or adding a
>> horizontal rule before it and it works fine. Why i don't know.

> What's the HTML output of (:commentboxchrono:)?

For both tests i was not logged in (no edit permission),
Pages Forum3.Test5 and Forum3.Test6 did not exist.
$DefaultPageTextFmt = ''; I set it to nil for testing. But it did not
make a difference.

Test 1: commentbox does not post to not-created page
GroupFooter:
(:commentboxchrono:)
  
html source:
<div id='wikitext'>
<div id='message'><form name=cboxform class='inputform' action='http://localhost/softflow/design/Forum3/Test6' method='post'>
    <input type='hidden' name='n' value='Forum3.Test6' />
    <input type='hidden' name='action' value='comment' />
    <input type='hidden' name='order' value='chrono' />
    <table width='90%'><tr>
    <th class='prompt' align='right' valign='top'>Comment&nbsp;</th>
    <td><textarea class='inputtext commenttext' name='text' rows=6 cols=50></textarea>
    </td></tr><tr><th class='prompt' align='right' valign='top'>Author&nbsp;</th>
    <td><input class='inputbox commentauthorbox' type='text' name='author' value='' size='32' />
    <input class='inputbutton commentbutton' type='submit' name='post' value=' Post ' />
    <input class='inputbutton commentbutton' type='reset' value='Reset' /></td></tr></table><br /></form></div>
</div>

Test 2: commentbox does post to not-created page:
GroupFooter:
----
(:commentboxchrono:)

html source:
<div id='wikitext'>
<hr />
<div id='message'><form name=cboxform class='inputform' action='http://localhost/softflow/design/Forum3/Test5' method='post'>
    <input type='hidden' name='n' value='Forum3.Test5' />
    <input type='hidden' name='action' value='comment' />
    <input type='hidden' name='order' value='chrono' />
    <table width='90%'><tr>
    <th class='prompt' align='right' valign='top'>Comment&nbsp;</th>
    <td><textarea class='inputtext commenttext' name='text' rows=6 cols=50></textarea>
    </td></tr><tr><th class='prompt' align='right' valign='top'>Author&nbsp;</th>
    <td><input class='inputbox commentauthorbox' type='text' name='author' value='' size='32' />
    <input class='inputbutton commentbutton' type='submit' name='post' value=' Post ' />
    <input class='inputbutton commentbutton' type='reset' value='Reset' /></td></tr></table><br /></form></div>
</div>

Test 3: commentbox posts on not-created page, $DefaultPageTextFmt is set to
$DefaultPageTextFmt = 'Compose message, add author name, and click post';

GroupFooter:
[[<<]]
(:commentboxchrono:)

html source:
<div id='wikitext'>
<p>Compose message, add author name, and click post
<br clear='all' />
</p><div id='message'><form name=cboxform class='inputform' action='http://localhost/softflow/design/Forum3/Test7' method='post'>
    <input type='hidden' name='n' value='Forum3.Test7' />
    <input type='hidden' name='action' value='comment' />
    <input type='hidden' name='order' value='chrono' />

    <table width='90%'><tr>
    <th class='prompt' align='right' valign='top'>Comment&nbsp;</th>
    <td><textarea class='inputtext commenttext' name='text' rows=6 cols=50></textarea>
    </td></tr><tr><th class='prompt' align='right' valign='top'>Author&nbsp;</th>
    <td><input class='inputbox commentauthorbox' type='text' name='author' value='admin' size='32' />
    <input class='inputbutton commentbutton' type='submit' name='post' value=' Post ' />
    <input class='inputbutton commentbutton' type='reset' value='Reset' /></td></tr></table><br /></form></div>

</div>

test 3 has the curious result in the html that <br clear='all' />
comes before the closing </p> from the DefaultPageText.
But the commentbox posted alright.


Commentbox format in commentboxstyled.php:
SDV($CommentBoxFmt,"<div id='message'><form name=cboxform class='inputform' action='\$PageUrl' method='post'>
    <input type='hidden' name='n' value='\$FullName' />
    <input type='hidden' name='action' value='comment' />
    <input type='hidden' name='order' value='\$Chrono' />
    <table width='90%'><tr>
    <th class='prompt' align='right' valign='top'>$[Comment]&nbsp;</th>
    <td><textarea class='inputtext commenttext' name='text' rows=6 cols=50></textarea>
    </td></tr><tr><th class='prompt' align='right' valign='top'>$[Author]&nbsp;</th>
    <td><input class='inputbox commentauthorbox' type='text' name='author' value='\$Author' size='32' />
    <input class='inputbutton commentbutton' type='submit' name='post' value=' $[Post] ' />
    <input class='inputbutton commentbutton' type='reset' value='$[Reset]' /></td></tr></table><br /></form></div>");

All with pmwiki 2.1.beta21, tested with Firefox 1.5


Best, 
~Hans                           






More information about the pmwiki-users mailing list