Fast clicking bug
-
If you click fast on Like Submit button it couts all your votes before it get the Ajax response.
So you can like a comment or a post more than once if you know this bug (you don’t need to be too fast).
I made a weak quick patch directly in the JS function (located on main.php) changing this:
function alter_ul_post_values(obj,post_id,ul_type) { if(!working){ working = true; jQuery(obj).find("span").html(".."); jQuery.ajax({ type: "POST", url: "<?php echo plugins_url( 'ajax_counter.php' , __FILE__ );?>", data: "post_id="+post_id+"&up_type="+ul_type, success: function(msg){ jQuery(obj).find("span").html(msg); working = false; } }); } }
for this
var working = false; function alter_ul_post_values(obj,post_id,ul_type) { if(!working){ working = true; jQuery(obj).find("span").html(".."); jQuery.ajax({ type: "POST", url: "<?php echo plugins_url( 'ajax_counter.php' , __FILE__ );?>", data: "post_id="+post_id+"&up_type="+ul_type, success: function(msg){ jQuery(obj).find("span").html(msg); working = false; } }); } }
I know it’s a temporal solution. If I got more time ill try to fix it directly from php function.
https://www.ads-software.com/extend/plugins/like-dislike-counter-for-posts-pages-and-comments/
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Fast clicking bug’ is closed to new replies.