We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34147
    • 28 Posts
    Hey guys just having a little trouble with what i believe is an issue in my tpl for QuipReply. I first made sure that I could comment before I created and used the tpl's, and it works. I then tested the tplComment and it works fine. But when I try to use my tpl for tplAddComment it posts in the manager but not in the post itself. It just resets the form w/ the error text, blinks to the top of the page, and hash tags "index.php?id=13#quip-comment-preview-box-qcom" in the URL. No comment appears at all. Also recaptcha doesn't show up either. Am I missing something?

    Quip Call
    [[!Quip? &thread=`[[*pagetitle]] - [[*id]]` &useGravatar=`0` &maxDepth=`3` &closeAfter=`21` &tplComment=`quipcommenttpl`  ]]


    QuipReply Call
    [[!QuipReply? &thread=`[[*pagetitle]] - [[*id]]` &tplAddComment=`quipreplytpl` &recaptcha=`1` &tplPreview=`quipcommenttpl`]]


    tplComment
    <li>
    <img src="assets/images/avatar.png" />
    <div class="comment">
    <h5>[[+authorName]]</h5>
    <span class="date">[[+createdon]]</span>
    <p>[[+body]]</p>
    </div>
    <div >
            [[+report]]
            [[+options]]
        </div>
    [[+children:notempty=`<ol>[[+children]]</ol>`]]
    </li>


    tplAddComment
    [[+preview]]
    <span class="quip-success" id="quip-success-[[+idprefix]]">[[+successMsg]]</span>
    
    <form action="[[+url]]#quip-comment-preview-box-[[+idprefix]]" method="post">
    <div class="row">
    <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>
    <div class="row">
    <p><label>[[%quip.name? &namespace=`quip` &topic=`default`]]: <span class="quip-error"> [[+error.name]]</span></label><input type="text" class="text_field" value="[[+name]]" /></p>
    <p><label>[[%quip.email]]: <span class="quip-error"> [[+error.email]]</span></label><input type="text" class="text_field" value="[[+email]]" /></p>
    <p><label>[[%quip.website]]: <span class="quip-error"> [[+error.website]]</span></label><input type="text" class="text_field" value="[[+website]]" /></p>	
    <p><label>[[%quip.comment_add_new]]: <span class="quip-error"> [[+error.comment]]</span></label><textarea class="text_field" rows="10" cols="10">[[+comment]]</textarea></p>
    <p><label>[[%quip.notify_me]]: <span class="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"`]] /></p>
    <p> [[+quip.recaptcha_html]]
        <span class="quip-error">[[+error.recaptcha]]</span></p>
    									</div>
    <button class="button" type="submit" name="[[+preview_action]]" value="1">[[%quip.preview]]</button>
    [[+can_post:is=`1`:then=`<button class="button" type="submit" name="[[+post_action]]" value="1">[[%quip.post]]</button>`]]
    								</form>
      • 34147
      • 28 Posts
      Come on community, could really use the help here.
        • 14437
        • 31 Posts
        Dunno, but, your # points to a post preview.. ?

        Did you specify a position for the preview? Or maybe disable the preview option in the snippet call?

        Just guessing.. !
          • 37221 ☆ A M B ☆
          • 5 Posts
          If I compare your tpl with the default one I see there is an id missing in the form element. Could that be the problem here?
            • 34147
            • 28 Posts
            If it were just a preview issue I would just disable it. But the id is the closest solution I can see right now, thanks. I will post if it worked.
              • 34147
              • 28 Posts
              I used quips id and placed in the form, but still no joy. I am just not seeing why I can't post or preview with my tpl...
                • 37221 ☆ A M B ☆
                • 5 Posts
                I'm sorry to hear the id was not the solution. I have never used this add on. May be tommorrow I can try it out for you.
                Otherwise (if you not already did this):
                1) copy the original (the default one) tplAddComment to your chunk (quipreplytpl) and see if it works
                2) if it works, alter step by step the contents of the tpl to your wishes

                You mention that the recaptcha doesn't show up either. Maybe you could disable it and see what happens. [ed. note: hankdroid last edited this post 15 years ago.]
                  • 37221 ☆ A M B ☆
                  • 5 Posts
                  Hi, a bit later than planned I tested your code out and came out on the same problem. Than I compared your tpl with the default one again.
                  Other difference I found is that you do not have the 'for' tag in your labels and no 'name' tag in the inputs.
                  I suspect that the validate function needs these to perform a proper validation.
                  So I added those tags and after that the preview and post worked just fine.