WordPress.org

Ready to get started?Download WordPress

Forums

"only post a new comment once every 15 seconds" problem (32 posts)

  1. blazin6543
    Member
    Posted 7 years ago #

    ok this is odd. i made a comment on my blog, then i tried making another comment to another post and i get that error, "Sorry, you can only post a new comment once every 15 seconds. Slow down cowboy." why am i getting this when i am the admin of the blog? i didnt change their preferences anywhere.

  2. estjohn
    Member
    Posted 7 years ago #

    wp feature to keep people from spamming? I have seen it on this site as well as my own to.. though I tried again a minute later and it was ok

  3. It's a hard coded flood protection. Version 2.1 will allow plugins to change that value, or even disable it for admins.

    But for now, just wait 15 seconds before posting another comment. ;)

  4. blazin6543
    Member
    Posted 7 years ago #

    no no..... i know what its for..... but even after 15 seconds i still cant post. i searched and found one topic about some "future" commenting but that didnt seem to work, unless i missed something.

  5. but even after 15 seconds i still cant post

    Are you sure? I've never had nor heard of that problem before.

  6. blazin6543
    Member
    Posted 7 years ago #

    oh im very sure lol i really dont know whats going on or what to do :(

  7. Can we have a link to your blog (or even a test post / page) so that we can test?

  8. blazin6543
    Member
    Posted 7 years ago #

  9. I had no problems posting. I did run into the limit if I didn't wait long enough, but besides that, I was fine.

    Are you still unable to post any comments?

    And you can go ahead and delete my comments on the testosterone post. ;)

  10. blazin6543
    Member
    Posted 7 years ago #

    ok thats really messed up because even when i log out and try posting a comment i cant, even if im posting a comment for the first time in hours. it must be some ip block im assuming then ??????

    lol nice comments btw :D

  11. blazin6543
    Member
    Posted 7 years ago #

    ok it has to be something messed up with me. i clear my cookies cleared my cache and still ERROR ERROR. i asked someone else to try and it works fine for her. this is really annoying :(

    btw im keeping your comment :D

  12. It checks the database for the latest comment from your IP or e-mail address and then compares the timestamp to the current time.

    Did you manually edit the time of your last comment to the future or something? That'd cause the flood protection to kick in since the future is obviously not more than 15 seconds ago. ;)

  13. blazin6543
    Member
    Posted 7 years ago #

    i noticed one post about "future" comments done by wordpress and i did notice the timestamp was a later date. so i changed it but i was still getting the "15 seconds" error. but now i went into my database (never woulda thought of going there) and the date was still in the future, i changed it and now everything is back to normal. much thanks man. :D

    im just wondering now, how come wordpress edits the timestamp like that? and how come after editing the timestamp it still didnt fix it until i went into mysql?

  14. WordPress should never do anything like that on it's own. You either did it accidentally or a bug happened somewhere with MySQL.

  15. adamantius
    Member
    Posted 7 years ago #

    Ok, so I'm having the same problem Blazin is having. On top of that, some other visitors to my blog have reported that they simply can't comment--their computer simply thinks and thinks and never posts. This is on both home and school computers. I have tried disabling AJAX commenting, but that didn't fix the problem for my visitors (though it did solve the "slow down cowboy" problem I was experiencing). I have checked the timestamps on my posts and see nothing that should triger that error.

    my URL is http://www.adamantius.net

    I would certainly appreciate any help you can give...

  16. MoofoWordpress
    Member
    Posted 7 years ago #

    I also have the same problem. Deleting the last post I made seems to work.

  17. MoofoWordpress
    Member
    Posted 7 years ago #

    BTW, the bug occur in my site only if i'm using K2's ajax live commenting....

    Trying to find were is the mistake in the code

  18. MoofoWordpress
    Member
    Posted 7 years ago #

    Found it.

    I think it comes from the daylight saving time.

    When a post is submitted, the code is checking for:

    The actual time (GMT) minus the time of the last post (GMT)

    Every time, that calculation ends up something like -3500

    3600 Seconds is a minute.

    The code won't allow you to post before an hour...

    To correct:

    In the file: comments-ajax.php

    Find the line

    if ( ($time_newcomment - $time_lastcomment) < 15

    and replace by

    if ( ($time_newcomment - $time_lastcomment) < -3585

    I will transmit the info to the K2 web.

    Note, if not using live commenting, it works OK.

  19. Thyrosis
    Member
    Posted 7 years ago #

    Right, I'm in thesame situation here. I've noticed that the server that hosts my log has had a problem with timing, so that I had some future posts. I tried to edit the timestamps manually, but that didn't work.

    So, to edit them in the database... where can I find that database again??

  20. MrCosmo
    Member
    Posted 7 years ago #

    Where do I find comments-ajax.php? I have been looking all over my website and can't find the file. What folder might it be in?

  21. mootilda
    Member
    Posted 7 years ago #

    MooFoWordpress, doing the above change doesn't help. It still results in the "wait for 15 seconds" warning.

    Any ideas? I'm changing the comments-ajax.php file in the k2 folder.

    Thanks.

    MrCosmo -- > The file is in your wp-content/themes/k2/ directory.

  22. diddy1
    Member
    Posted 7 years ago #

    Hey guys this is from the k2 forum and it worked for me:

    Try remove in comments-ajax.php:

    // Simple flood-protection
    if ( ! isset($comment_author_IP) )
    $comment_author_IP = $_SERVER['REMOTE_ADDR'];
    if ( ! isset($comment_date) )
    $comment_date = current_time('mysql');
    if ( ! isset($comment_date_gmt) )
    $comment_date_gmt = gmdate('Y-m-d H:i:s', strtotime($comment_date) );
    if ( ! isset($comment_approved) )
    $comment_approved = 1;

    $comment_user_domain = apply_filters('pre_comment_user_domain', gethostbyaddr($comment_author_IP) );

    if ( $lasttime = $wpdb->get_var("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_author_IP = '$comment_author_IP' OR comment_author_email = '$comment_author_email' ORDER BY comment_date DESC LIMIT 1") ) {
    $time_lastcomment = mysql2date('U', $lasttime);
    $time_newcomment = mysql2date('U', $comment_date_gmt);
    if ( ($time_newcomment - $time_lastcomment) < 15 ) {
    do_action('comment_flood_trigger', $time_lastcomment, $time_newcomment);
    fail(__('Sorry, you can only post a new comment once every 15 seconds. Slow down cowboy.','k2_domain') );
    }
    }

    Though there should be a better way to solve this problem as someone may need their flood protection.

    Thank You

  23. jesseg
    Member
    Posted 7 years ago #

    The issue seems to also happen when you are running WP on a VMWare hosted system. VMware has always been wonky about time, after about three weeks my system clock is about a day ahead. If I reboot it at that point it resyncs with the VMWare ESX server clock, and boom, my posts are dated a day or two in the future.

    I disabled the flood-trigger in mine by commenting out the following lines in ./wp-includes/comment-functions.php

    // do_action('comment_flood_trigger', $time_lastcomment,
    $time_newcomment);
    // die( __('Sorry, you can only post a new comment once
    every 15 seconds. Slow down cowboy.') );

    And it seems to work wonderfully - (it still checks the timestamp, just doesn't care or act on what it finds) if I am the recipient of a true flood I'll probably regret having done this, but as I've had a handful of users complain about this particular bug, I felt it more prudent to remove the limitation.

  24. war59312
    Member
    Posted 7 years ago #

    Why not simply make it a longer period of time then?

    Also, anyway I can make it so that only the User Role of subscriber has a time limit?

  25. alenm88maccom
    Member
    Posted 7 years ago #

    GOT IT and these really works

    Diddy1 was kind of radical, you just have to delete


    if ( ($time_newcomment - $time_lastcomment) < 15 ) {
    do_action('comment_flood_trigger', $time_lastcomment, $time_newcomment);
    fail(__('Sorry, you can only post a new comment once every 15 seconds. Slow down cowboy.','redo_domain') );
    }

    This is not a permanet solution. Lets wait for a bug correction. Meanwhile this is a good alternative

    PD: i had the same problem of the 15 seconds, even i waited 10 minutes it said that i have to wait.

  26. metavalent
    Member
    Posted 7 years ago #

    Seven months later, using WP 2.1.3, I just now ran into this same problem. Here's the extra fun, in the database we have:

    comment_date 2007-05-12 09:41:33
    comment_date_gmt 2007-05-12 17:41:33

    Current system time is 2007-05-12 11:22:50
    Current GMT time is 2007-05-12 19:22:50

    No time-travel issues, the present appears to be the present and the future, the future. Now what?

  27. Chris_K
    Member
    Posted 7 years ago #

    Or you could set your computer's clock and date.

    I'm guessing, at the end of the day, that's the core issue.

  28. metavalent
    Member
    Posted 7 years ago #

    So I set my current time/date ahead by a MONTH to:

    Current system time is 2007-06-12 11:27:14

    Still:

    Sorry, you can only post a new comment once every 15 seconds. Slow down cowboy.

  29. metavalent
    Member
    Posted 7 years ago #

    what's odd is that nothing changed over the past week. i've been running WP and K2 for well over a year and never seen this before. i do suspect it's something on my end, but can't imagine what. i work all week and only have time to mess around with blogging as a weekend hobby, so not a lot of moving parts in my case. i'll try from another machine and get back to the thread. thanks for the prompt and helpful ideas.

  30. Chris_K
    Member
    Posted 7 years ago #

    So I set my current time/date ahead by a MONTH to:

    I was angling more for having you set your date/time to be correct -- presumably to match your web server.

Topic Closed

This topic has been closed to new replies.

About this Topic