Something is amiss in my preview comment template. Anon users are not shown the captcha box on the preview comment page and thus always results in an error. Users logged in via openid don't see the captcha on either and works. I'm not sure what is wrong, but I suspect a javascript is missing. There are some onfocus calls, but I don't see what it is calling too. I tried copying the javascript that from the comment page to the preview page, but when the comment text is now put in the textarea box. I'm missing something. Here is my code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" id="sixapart-standard">
<head>
<script type="text/javascript">
/* <![CDATA[ */
var user = <$MTUserSessionState$>;
var is_preview = true;
/* ]]> */
</script>
<$mt:include module="HTML Head"$>
<title><$MTBlogName encode_html="1"$>: Previewing your Comment</title>
</head>
<body id="<$mt:BlogTemplateSetID$>" class="mt-comment-preview <$MTVar name="page_layout"$>" onload="mtEntryOnLoad()">
<div id="container">
<div id="container-inner">
<$mt:include module="Banner Header"$>
<div id="content">
<div id="content-inner">
<div id="alpha">
<div id="alpha-inner">
<h1 id="page-title" class="alt-title">Previewing your Comment</h1>
<div id="comments" class="comments" style="margin-left: 55px;">
<mt:ignore><!-- Comment Preview --></mt:ignore>
<div id="comment-<$MTCommentID$>" class="comment<mt:IfCommentParent> comment-reply</mt:IfCommentParent><mt:IfCommenterIsEntryAuthor> comment-by-author</mt:IfCommenterIsEntryAuthor>">
<div class="inner">
<div class="comment-content">
<div class="comment-content-inner">
<$MTCommentBody$>
</div>
</div>
<div class="comment-header">
<div class="asset-meta">
<span class="byline">
<$MTCommentAuthorIdentity$>
<mt:IfCommentParent>
<span class="vcard author"><$MTCommentAuthorLink$></span> replied to <a href="<mt:CommentParent><$mt:CommentLink$></mt:CommentParent>">comment from <mt:CommentParent><$MTCommentAuthor$></mt:CommentParent></a>
<mt:else>
<span class="vcard author"><$MTCommentAuthorLink$></span>
</mt:IfCommentParent>
| <a href="<$mt:CommentLink$>"><abbr class="published" title="<$MTCommentDate format_name="iso8601"$>"><$MTCommentDate$></abbr></a>
<MTIfCommentsAccepted>
| <$MTCommentReplyToLink$>
</MTIfCommentsAccepted>
</span>
</div>
</div>
</div>
</div>
<mt:ignore><!-- Comment Form --></mt:ignore>
</div>
<div class="comments-open" id="comments-open">
<h2 class="comments-open-header">Leave a comment</h2>
<div class="comments-open-content">
<div id="comment-greeting"></div>
<form method="post" action="<$MTCGIPath$><$MTCommentScript$>" name="comments_form" id="comments-form" onsubmit="return mtCommentOnSubmit(this)">
<div id="comments-form-inner">
<input type="hidden" name="static" value="1" />
<input type="hidden" name="armor" value="1" />
<input type="hidden" name="preview" value="" />
<input type="hidden" name="entry_id" value="<$MTEntryID$>" />
<input type="hidden" name="__lang" value="<$MTBlogLanguage$>" />
<mt:IfCommentParent>
<input type="hidden" name="parent_id" value="<$mt:CommentParentId$>" id="comment-parent-id">
</mt:IfCommentParent>
<div id="comments-open-data">
<div id="comment-form-name">
<label for="comment-author">Name</label>
<input id="comment-author" name="author" size="30" value="<$MTCommentAuthor encode_html="1"$>" onfocus="mtShowCaptcha()" />
</div>
<div id="comment-form-email">
<label for="comment-email">Email Address</label>
<input id="comment-email" name="email" size="30" value="<$MTCommentEmail encode_html="1"$>" onfocus="mtShowCaptcha()" />
</div>
<div id="comment-form-url">
<label for="comment-url">URL</label>
<input id="comment-url" name="url" size="30" value="<$MTCommentURL encode_html="1"$>" onfocus="mtShowCaptcha()" />
</div>
</div>
<mt:IfCommentParent>
<div id="comment-form-reply">
<input type="checkbox" id="comment-reply" name="comment_reply" value="<$mt:CommentParentId$>" checked="checked" onclick="mtSetCommentParentID()" />
<label for="comment-reply" id="comment-reply-label">Replying to comment from <mt:CommentParent><$MTCommentAuthor$></mt:CommentParent></label>
</div>
</mt:IfCommentParent>
<div id="comments-open-text">
<label for="comment-text">Comments <MTIfAllowCommentHTML>(You may use HTML tags for style)</MTIfAllowCommentHTML></label>
<textarea id="comment-text" name="text" rows="15" cols="50" onfocus="mtShowCaptcha()"><$MTCommentBody autolink="0" sanitize="0" convert_breaks="0" encode_html="1"$></textarea>
</div>
<div id="comments-open-captcha"></div>
<div id="comments-open-footer">
<input type="submit" accesskey="v" name="preview_button" id="comment-preview" value="Preview" onclick="this.form.preview.value='1';" />
<input type="submit" accesskey="s" name="post" id="comment-submit" value="Submit" />
<input type="button" name="cancel" id="comment-cancel" value="Cancel" onclick="window.location='<$MTEntryPermalink$>'" />
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<$MTInclude module="Sidebar"$>
</div>
</div>
<$mt:include module="Banner Footer"$>
</div>
</div>
<div id="overlay"></div>
<div id="dialog"><div id="dialog-inner">
<div id="dialog-content"></div>
<a href="javascript:dialogClose();" id="dialog-close">Close</a>
</div></div>
</body>
</html>
Reported on Movable Type 4.2
Can you post a link so we can have a look.
Yeah, http://www.jacklail.com/
Attempt to make a comment as an anon user and then if you like, try it as an open id user.
Posted as anon, did not sign in with anything
Fill in CAPTCHA and hit preview, previewed OK with a different CAPTCHA that I filled in and pressed submit.
Comment has gone into moderation.
Dang, it is working now. Maybe I did something that worked. Thanks Rob!