The problem is that I can't use native commenting system. A template is controlled by custom routes and I think that it may be incompatible with comments. The variable "k_is_commentable" gets set because I can see a comment form but when I click submit button it says:
Could not post comment!
The following error occured while processing your comment:
Page not commentable
source:
Could not post comment!
The following error occured while processing your comment:
Page not commentable
source:
- Code: Select all
<cms:if k_matched_route='page_view' >
<cms:pages page_name="<cms:show rt_page_name />" >
<cms:if k_is_commentable >
<div>
<cms:form method="post" >
<cms:if k_success >
<cms:process_comment />
<cms:if k_process_comment_success>
<div class="k_successmessage">
<p>
Thank you for the feed back! <br>
Your comment awaits moderation and will be published as soon as reviewed by the Admin.
</p>
</div>
<cms:else />
<div class="k_errormessage">
<p>
Could not post comment! <br>
The following error occured while processing your comment:<br>
<cms:show k_process_comment_error />
</p>
</div>
</cms:if>
<cms:else />
<cms:if k_error >
<div class="k_errormessage">
<h2>Fields incomplete!</h2>
<ul>
<cms:each k_error >
<li><cms:show item /></li>
</cms:each>
</ul>
</div>
</cms:if>
<p class="comment-input">
<cms:input type="text" name="k_author" size="22" tabindex="1" required="1"/>
<label for="author"><small>Name *</small></label>
</p>
<p class="comment-input">
<cms:input type="textarea" name="k_comment" style="width:93%" rows="10" cols="10" tabindex="4"
validator_msg="required=Please enter something as comment"
required="1" />
</p>
<p class="comment-input">
<label for="captcha"><small>Please enter this word in the textbox below</small></label><br>
<cms:input type="captcha" name="captcha" format='i-r-t' />
</p>
<cms:input type="submit" value="Submit" name="submit"/>
</cms:if>
</cms:form>
</div>
</cms:if>
</cms:pages>
</cms:if>