Error posting comments
-
When logged in I can comment without an issue, but when not logged in, or when readers are wanting to comment the following error occurs.
Go back and try again.
Error: answer is wrong.
Error: field should be empty.
-
Submit url with the problem via feedback form and I will check it.
Here is a link to the dev version of our site where the plugin is activated.
Now we get the error…
Go back and try again.
Error: answer is wrong. [Current month ye@r day*]
Error: field should be empty. [Leave this field empty*]I deleted the old plugin, and uploaded the latest version 1.6
I apologize, I left the link out… try here https://dev.8bitsoul.com/gears-of-war-judgement/
Anti-spam plugin has conflict with javascript from “Origin” theme.
The Anti-spam plugin answer question about current year instead of user via javascript.
You use the theme where text from label inserted into input value and works like placeholder.
So javascript from your theme (custom.js) inserts into anti-spam inputs text from labels and it breaks the work of Anti-spam plugin.
This code does it:
$comment_form.find('input:text, textarea').each(function(index,domEle){ var $et_current_input = jQuery(domEle), $et_comment_label = $et_current_input.siblings('label'), et_comment_label_value = $et_current_input.siblings('label').text(); if ( $et_comment_label.length ) { $et_comment_label.hide(); if ( $et_current_input.siblings('span.required') ) { et_comment_label_value += $et_current_input.siblings('span.required').text(); $et_current_input.siblings('span.required').hide(); } $et_current_input.val(et_comment_label_value); } }).bind('focus',function(){ var et_label_text = jQuery(this).siblings('label').text(); if ( jQuery(this).siblings('span.required').length ) et_label_text += jQuery(this).siblings('span.required').text(); if (jQuery(this).val() === et_label_text) jQuery(this).val(""); }).bind('blur',function(){ var et_label_text = jQuery(this).siblings('label').text(); if ( jQuery(this).siblings('span.required').length ) et_label_text += jQuery(this).siblings('span.required').text(); if (jQuery(this).val() === "") jQuery(this).val( et_label_text ); }); // remove placeholder text before form submission $comment_form.submit(function(){ $comment_form.find('input:text, textarea').each(function(index,domEle){ var $et_current_input = jQuery(domEle), $et_comment_label = $et_current_input.siblings('label'), et_comment_label_value = $et_current_input.siblings('label').text(); if ( $et_comment_label.length && $et_comment_label.is(':hidden') ) { if ( $et_comment_label.text() == $et_current_input.val() ) $et_current_input.val( '' ); } }); });
You can fix it by excluding anti-spam inputs from being processed via javascript placeholder script.
I’m sorry, but I’m not that familiar with js. How would I go about excluding anti-spam inputs from being processed via javascript?
I tried to fix it via js but have no luck.
So the easiest solution for you is to fix it via plugin patch.
I made special version of anti-spam plugin for your case. Let me know if it worked.https://mega.co.nz/#!gYpRBK6C!ZYmfiRsrzfRA4MUOWGmRrHKy2wBbNxHUK2VXBgv2-IY
Hi Vitaly,
I have same issue on my site, for example check page below:
https://simplefinanz.com/apple-earnings-release-q2-2013/Tried your latest special version as well, without success.
Many thanks in advance for the help.
@simplefinanz: I cannot see hidden Anti-spam inputs on your site in comments form.
Anti-spam plugin use ‘comment_form’ action and I think it is missed somehow in your theme.
You may check out how ‘comment_form’ action used on other themes with custom comments form (instead of default comment_form() function) and do the same with your theme.Or just try to add this code to comments.php file before closing form-tag:
<?php do_action('comment_form()', $post->ID); // comment_form(); ?>
Tried adding the code, same error:
Error: empty answer. []I have disabled the plugin until finding a solution.
Error: empty answer. []
“Empty answer” means that you don’t have anti-spam inputs in your comments foorm. At the end of the form should be such html block:
<p class="comment-form-anti-spam" style="clear:both;"> <label for="anti-spam-q">Current <span style="display:none;">month</span> <span style="display:inline;">ye@r</span> <span style="display:none;">day</span></label> <span class="required">*</span> <input type="hidden" name="anti-spam-a" id="anti-spam-a" value="2013" /> <input type="text" name="anti-spam-q" id="anti-spam-q" size="30" value="1980" /> </p> <p class="comment-form-anti-spam-2" style="display:none;"> <label for="anti-spam-e-email-url">Leave this field empty</label> <span class="required">*</span> <input type="text" name="anti-spam-e-email-url" id="anti-spam-e-email-url" size="30" value=""/> </p>
Sorry, I think I told you to add the wrong code.
Try to add this code to the end of your comments form:<?php do_action('comment_form', $post->ID); ?>
webvitaly… I uploaded the new file you made for me. Unfortunately it didn’t work, the submit button no longer works once the plug-in is activated. I can fill out the comment form, but submit is not clickable. Once I turn off the plugin it works.
I think I know where I made a mistake.
Please, try this one: https://mega.co.nz/#!gVQ3nZCB!N7gYeQV9CkIyWXzBlFM5RjFxK6gr9KMUGGrSleWt_B4. I hoppe this version will work for you.
Thank you for your help. It works! I really appreciate you taking the effort to fix the issue.
Thanks again!
You are welcome.
Just remember that you use separate branch version of Anti-spam plugin (because of conflicts with your theme) and it will not update from official repository. But don’t be afraid, it will block spam pretty good as main version.
If you will switch theme on your site than you may re-install Anti-spam plugin and you will be up-to-date.
Hello webvitaly
i’ha just installed your plug in into this website https://armadiosemprevuoto.com
but when i try to comment a post it gives me the same error of juventuz:
Error: answer is wrong. [Current month ye@r day*]
Error: field should be empty. [Leave this field empty*]by the way, i tried even with the version you mentioned above but no way.. always the same error..
right now i need the comments to be active, so i need to deactivate the plugin, could you help me anyway?
thanks in advance
- The topic ‘Error posting comments’ is closed to new replies.