I'm trying to get working comments of my custom page using php scripted template (which do some math calculations).
Somehow I managed to make it work for a moment, but by editing my script more and more I've crashed comments to the point where I have no idea how to fix it.
The problem is very simple - in comments part of page I have:
<!-- commenting_data -->
<p><textarea name="comment" id="comment_text" tabindex="4"></textarea></p>
<p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
<input type='hidden' name='comment_post_ID' value='' id='comment_post_ID' />
<input type='hidden' name='comment_parent' id='comment_parent' value='0' />
- so the value of comment_post_ID is missing.
I have no idea how to set it up, or how it got removed - especially because I don't use variable $comment_post_ID anywhere in my script, nor am manipulating the $_POST data.
The php code in wp-comments-post.php throws an error in this part of code:
if ( empty($status->comment_status) ) {
do_action('comment_id_not_found', $comment_post_ID);
echo "comment_id_not_found";
exit;
}
(added echo instruction to find out an error)
Anyone might have an idea how to restore comment_post_ID? Or how to set it up again, or how to bypass the problem?