Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Lester Chan

    (@gamerz)

    Is it because all your comment author is behind the same IP?

    You can do a var_dump after this line https://github.com/lesterchan/wp-postratings/blob/master/wp-postratings.php#L289 and see what is the output.

    Thread Starter rivmedia

    (@rivmedia)

    The author is behind the same IP for testing purposes, but in the settings we are logging by username, not by IP or cookie.

    This is the result of the var dump

     
    		
    array(2) {
      [0]=>
      object(stdClass)#7666 (3) {
        ["rating_username"]=>
        string(8) "Rivmedia"
        ["rating_rating"]=>
        string(1) "5"
        ["rating_ip"]=>
        string(14) "99.189.192.178"
      }
      [1]=>
      object(stdClass)#7663 (3) {
        ["rating_username"]=>
        string(4) "Book"
        ["rating_rating"]=>
        string(1) "4"
        ["rating_ip"]=>
        string(14) "99.189.192.178"
      }
    }
    
    • This reply was modified 6 years, 5 months ago by rivmedia.
    Plugin Author Lester Chan

    (@gamerz)

    Because if the username is not there, it will default to the IP. And since all of the test is behind the same IP, it will show the same ratings.

    Thread Starter rivmedia

    (@rivmedia)

    That doesn’t make any logical sense surely? The usernames are there ( all users are logged in to comment ) , so the plugin shouldnt replicate the last rating given on a post for all users which do not have ratings regardless of whether someone is behind the Same IP.

    The first two ratings are also behind the same IP, but they show correctly. Its only the comments which do NOT have ratings which are showing as having them incorrectly.

    • This reply was modified 6 years, 5 months ago by rivmedia.
    Plugin Author Lester Chan

    (@gamerz)

    Agreed. logically it doesn’t make sense. I will look into it when I have time, filed an issue on Github itself https://github.com/lesterchan/wp-postratings/issues/111

    Thread Starter rivmedia

    (@rivmedia)

    Thank you Lester, Look forward to seeing the resolution 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Ratings in comments’ is closed to new replies.