• Resolved martinrtr

    (@martinrtr)


    We discovered on our site flexxgenix.com that AntiSpam Bee was preventing woocommerce reviews from working. Specifically, the submit button was being disabled. It works again if we disable ASB. This is a shame because we love ASB and have it running with no problems on several other sites.

    A search of the forums and it seems like we’re the only ones suffering tbis issue. As a result we thought it might be a theme issue so we switched to a default WP theme and still encountered the same issue.

    Just wondering if anyone has encountered this and if so if there’s a solution out there. Or if anyone has any ideas on how we could fix it.

    If you want to see how it’s not working I have enabled ASB on the staging site.
    Here’s a typical product link: https://staging.flexxgenix.com/product/engraved-acylic-front-panel-control-panel-ebay/

    I’m running WP 5.9. It is a browser wide issue.

    Any ideas anyone?

    Thanks
    Martin

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Torsten Landsiedel

    (@zodiac1978)

    Hi @martinrtr

    the problem is a conflict from ASB and your theme.

    This is what is happening. The theme is using jQuery validator (https://jqueryvalidation.org/) and this is the code starting it:

    jQuery(document).ready(function($) {$("#commentform").validate({rules: {author: {required: true,minlength: 2},email: {required: true,email: true},comment: {required: true,minlength: 10}}});});

    It looks at the element with the “name” “comment” and if there aren’t at least 10 characters it spits out an error message under the textarea. Wich is strangely hidden from your theme with this CSS:

    form label.error {
    	display: none !important;
    }

    Our spam trap is switching the real comment form and a honeypot. But we only switch the ID with JS and not the name. The name stays as “comment”, which is why the validation JS is checking the honeypot which is hidden and therefore empty, generating an error message which was hidden by the theme …

    Now we know the problem, but what could be the solution? I didn’t found an easy way to change the behavior from the validator.

    Maybe you could remove the “required” rule from the honeypot. Something like that:

    jQuery( "textarea[name='comment']" ).rules( "remove", "required" );

    Unless you use a filter to change it, WordPress will not allow empty comments/reviews, if this helps.

    I will try to contact the author if we can find a better solution, but at least you now know what can be done to fix this!

    All the best
    Torsten

    Plugin Contributor Torsten Landsiedel

    (@zodiac1978)

    I found two themes in the official theme directory with the same problem:

    Elasta and NicheBase
    https://wpdirectory.net/search/01FTZH6GABGCR1CTHG89D6ESPD

    Disabling the rule for the honeypot seems to be the best way to solve this issue.
    If needed you can re-add the rule on the correct element again.

    With something like that:
    jQuery( "textarea[id='comment']" ).rules( "add", "required" );

    All the best
    Torsten

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘ASB Blocking woocomm product reviews’ is closed to new replies.