<![CDATA[ Error occur when preview comment then post - My Forums]]> https://forums.modx.com/thread/?thread=94315 <![CDATA[Error occur when preview comment then post]]> https://forums.modx.com/thread/94315/error-occur-when-preview-comment-then-post#dis-post-511143
[[+preview]]
<span class="quip-success" id="quip-success-[[+idprefix]]">[[+successMsg]]</span>

<div id="quip-comment-preview-box-[[+idprefix]]"></div> 
<form id="quip-add-comment-[[+idprefix]]" action="[[+url]]#quip-comment-preview-box-[[+idprefix]]" method="post">
<div class="quip-comment quip-add-comment">
    <input type="hidden" name="nospam" value="" />
    <input type="hidden" name="thread" value="[[+thread]]" />
    <input type="hidden" name="parent" value="[[+parent]]" />
    <input type="hidden" name="auth_nonce" value="[[+auth_nonce]]" />
    <input type="hidden" name="preview_mode" value="[[+preview_mode]]" />
 
     <div class="quip-fld">
        <label for="quip-comment-name-[[+idprefix]]">[[%quip.name? &namespace=`quip` &topic=`default`]]:<span class="quip-error">[[+error.name]]</span></label>
        <input type="text" name="name" id="quip-comment-name-[[+idprefix]]" value="[[+name]]" />
        <br />
    </div>
     
    <div class="quip-fld">
        <label for="quip-comment-email-[[+idprefix]]">[[%quip.email]]:<span class="quip-error">[[+error.email]]</span></label>
        <input type="text" name="email" id="quip-comment-email-[[+idprefix]]" value="[[+email]]" />
        <br />
    </div>
     
    <div class="quip-fld">
        <label for="quip-comment-website-[[+idprefix]]">[[%quip.website]]:<span class="quip-error">[[+error.website]]</span></label>
        <input type="text" name="website" id="quip-comment-website-[[+idprefix]]" value="[[+website]]" />
        <br />
    </div>
 
    <div class="quip-fld">
        <label for="quip-comment-notify-[[+idprefix]]">[[%quip.notify_me]]:<span class="quip-error">[[+error.notify]]</span></label>
        <input type="checkbox" value="1" name="notify" id="quip-comment-notify-[[+idprefix]]" [[+notify:if=`[[+notify]]`:eq=`1`:then=`checked="checked"`]] />
        <br />
    </div>
 
    <div class="quip-fld recaptcha">
    [[+quip.recaptcha_html]]
    <span class="error">[[+error.recaptcha]]</span>
	<br>
    </div>
     
     
    <p><span class="quip-allowed-tags">[[%quip.allowed_tags? &tags=`[[++quip.allowed_tags:htmlent]]`]]</span>[[%quip.comment_add_new]]<span class="quip-error">[[+error.comment]]</span></p>
    <textarea name="comment" id="quip-comment-box-[[+idprefix]]" rows="5">[[+comment]]</textarea>
     
    <button type="submit" name="[[+preview_action]]" value="1">[[%quip.preview]]</button>
    [[+can_post:is=`1`:then=`<button type="submit" name="[[+post_action]]" value="1">[[%quip.post]]</button>`]]
     
    <br class="clear" />
</div>
</form>


Chunk [tplPreview]:

<div class="comment-item" id="quip-comment-preview-box-[[+idprefix]]">
    <div class="citem-left">
        <img src="[[+gravatarUrl]]" alt="comment-author">
    </div>
    <div class="citem-right">
        <span class="c-username">[[+username]]</span> <span title="[[+createdon]]"> [[convertTimeAgo? &ptime=`[[+createdon]]`]]</span>
        <p>[[+comment]]</p>
    </div>
	<div class="clear"></div>
</div>


Quip Snippet:

[[!Quip? 
	&thread=`blogpost-[[*id]]` 
	&tplComment=`blog-comment-tpl` 
	&tplComments=`blog-comments-tpl` 
	&replyResourceId=`[[*id]]`
	]]


Quip Reply Snippet:

[[!QuipReply?
	&thread=`blogpost-[[*id]]`
	&tplPreview=`blog-preview-tpl`
	&tplAddComment=`blog-reply-form-tpl`
	&recaptcha=`1`
	]]



When you try to add a comment after filling up the fields then click Post, Quip works great. But the problem occurs when you click Preview first before posting. Error will show up in the textarea field "Error: IDs of users do not match. Fraud attempt detected.". I have no idea why it's doing that even if the captcha is correct. Also, when i checked error logs, this error shows up

(ERROR @ /index.php) `` is not a valid integer and may not be passed to makeUrl()


whenever i hit preview.


What did i do wrong? Thanks wink]]>
aerosko0315 Sep 24, 2014, 01:38 PM https://forums.modx.com/thread/94315/error-occur-when-preview-comment-then-post#dis-post-511143