Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2006-06-10 03:37:46
- keoshi
- Member

- From: Portugal
- Registered: 2006-04-30
- Posts: 53
Re: Removing 'Message' field from comment form
<code>
<div id=“commentform”><h3><a>Comment</a></h3><div id=“commenttext”>
<txp:comments_error /> <table cellpadding=“4” cellspacing=“0” border=“0”>
<tr>
<td align=“right” valign=“top”>
<label for=“name”><txp:text item=“nome” /></label>
</td>
<td valign=“top”>
<txp:comment_name_input />
</td>
<td valign=“top” align=“left”>
<txp:comment_remember />
</td>
</tr>
<tr>
<td align=“right” valign=“top”>
<label for=“email”><txp:text item=“email” /></label>
</td>
<td valign=“top” colspan=“2”>
<txp:comment_email_input />
</td>
</tr>
<tr>
<td align=“right” valign=“top”>
<label for=“web”>http://</label>
</td>
<td valign=“top” colspan=“2”>
<txp:comment_web_input />
</td>
</tr>
<tr>
<td valign=“top” align=“right”>
<label for=“message”><txp:text item=“comment” /></label>
</td>
<td valign=“top” colspan=“2”>
<txp:comment_message_input />
</td>
</tr>
<tr>
<td align=“right” valign=“top”> </td>
<td valign=“top” align=“left”>
<txp:comments_help />
</td>
<td align=“right” valign=“top”>
<txp:comment_preview />
<txp:comment_submit />
</td>
</tr>
</table></div></div>
</code>
Thanks for all your time and help, Mary.
Offline
#14 2006-06-10 03:42:57
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Removing 'Message' field from comment form
Hmm. I don’t see anything out of place there.
Can you post a tag trace of your individual article page where this is happening?
Is this live anywhere we can see?
Offline
#15 2006-06-10 03:52:24
- keoshi
- Member

- From: Portugal
- Registered: 2006-04-30
- Posts: 53
Re: Removing 'Message' field from comment form
Sure: here
I have activated the ‘Debugging’ state, hopefully you can see the problem.
Also, I have added the line you said: <code><input type=“hidden” name=“message” value=”—-” /></code>
Offline
#16 2006-06-10 04:02:31
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Removing 'Message' field from comment form
That is very strange. The first part of the form markup isn’t being output, which is breaking the form and so causing the rest to show up as text.
I can’t see any reason for this in your tags. Have you modified comments.php at all?
Offline
#17 2006-06-10 04:07:28
- keoshi
- Member

- From: Portugal
- Registered: 2006-04-30
- Posts: 53
Re: Removing 'Message' field from comment form
You mean /texpattern/publish/comment.php ?
I wasn’t sure so I uploaded the original one and it appears to have the same problem.
Offline
#18 2006-06-10 04:22:51
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Removing 'Message' field from comment form
You mean /texpattern/publish/comment.php ?
That’s right.
I wasn’t sure so I uploaded the original one and it appears to have the same problem.
Shoot. If you make sure and put <txp:comment_message_input /> in the form, does it suddenly work again? I think we’ve run into a brick wall.
Offline
#19 2006-06-10 04:25:31
- keoshi
- Member

- From: Portugal
- Registered: 2006-04-30
- Posts: 53
Re: Removing 'Message' field from comment form
It does… Damn it.
edit: isn’t there any (easy) way to make message also an optional field?
Last edited by keoshi (2006-06-10 04:26:20)
Offline
#20 2006-06-10 04:34:48
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Removing 'Message' field from comment form
One last thing we can try: after that hidden input
<input type="hidden" name="message" value="---" />
add:
<!-- plugin-place-holder -->
I agree, this should be easier. Hopefully we can get this as a setting, rather than trying to hack around it.
Offline
#21 2006-06-10 05:01:38
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Removing 'Message' field from comment form
Also, Alex made the suggestion of grabbing a copy of comment.php from svn and see if that one will let you do it.
To get it from svn, go here and scroll to the bottom of the page. Under “Download in other formats:” choose “Original Format”.
Offline
#22 2006-06-10 11:41:47
- keoshi
- Member

- From: Portugal
- Registered: 2006-04-30
- Posts: 53
Re: Removing 'Message' field from comment form
The <code><!— plugin-place-holder —></code> works!! Can you please explain why it works?
Thank you so much, Mary. But this should be definitely implemented as a core setting :)
Last edited by keoshi (2006-06-10 11:43:20)
Offline
Re: Removing 'Message' field from comment form
Can you please explain why it works?
It’s because every software is built with certain assumptions. One of the assumptions I made was that everybody who is using comments would use the built-in txp-tag for the message field. when I asked for feedback, nobody indicated otherwise. Then once it went live, it turned out some people were doing funny things, I hadn’t anticipated. ;) So, now we work around that. The reason why the code was changed at all, is due to the Anti-Spam-Plugin “API” that was introduced in 4.0.3.
What’s happening is that we stick a marker in on one pass, and then replace that marker in certain circumstances on the second pass. – Since we put in the marker ourselves (when txp_message is called) it wasn’t anticipated that it could be missing. Hence the “unintended side-effect”.
Last edited by Sencer (2006-06-10 13:21:21)
Offline
#24 2006-06-10 14:19:39
- keoshi
- Member

- From: Portugal
- Registered: 2006-04-30
- Posts: 53
Re: Removing 'Message' field from comment form
Spencer, thank you! :)
TXP is fantastic by itself and the support (and development, of course) crew just makes it even greater. Thank you all for creating this superb piece of software. :)
Offline