Rate limiting profile updates

Home Forums BuddyPress Rate limiting profile updates

Tagged: 

This topic contains 10 replies, has 2 voices, and was last updated by  J.D. Grimes 1 year, 1 month ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1231

    magland
    Participant

    With the buddypress module installed there are types for:

    – Set Profile photo
    – Set Profile cover image
    – Set Group photo
    – Set Group cover image

    Is there a way to rate limit the reactions for these types?

    I’ve had users upload several versions of their photo (tweaking the image and or crop) and it awards points each time, effectively allowing users to artificially increase their total!

    • This topic was modified 1 year, 5 months ago by  magland.
    #1234

    J.D. Grimes
    Keymaster

    These are supposed to remove the points when the image is deleted and a new one is uploaded. But maybe the old image delete isn’t always triggered when a new one is set, or something. I’ll look into it.

    It would be possible for an extension to enable the rate limit feature for any event. However, I don’t remember off of the top of my head if there might be any issues with using rate limits with events that are supposed to automatically reverse themselves. It seems like there was some reason that I didn’t enable rate limits for all events, but I can’t remember off of the top of my head what it was. I’d have to go back and look at my notes.

    #1235

    magland
    Participant

    I’ve just tested it with my own profile and the points were reversed correctly when I uploaded a new one…

    However, I can clearly see on one of my users accounts 13 successive points awards and no reversals.

    So yeah I’d say the delete event could very well be glitchy!

    #1236

    J.D. Grimes
    Keymaster

    I’ve discovered that when you delete the image from the Delete tab, rather than just uploading a new one in one go, the points are not removed. I’m still investigating the exact cause.

    • This reply was modified 1 year, 5 months ago by  J.D. Grimes. Reason: Clarity
    #1238

    J.D. Grimes
    Keymaster

    For the cover image, each time a new one is uploaded, the points are awarded, but the points aren’t reversed unless you hit the “Delete my cover image” button. And then, points for all of the cover images you’ve uploaded are removed!

    Some of this may be due to bugs in BuddyPress rather than the WordPoints extension, but I’ll get to the bottom of it and let you know what I find.

    #1239

    magland
    Participant

    Great thanks for looking into this, I’ve had to disable that event for now.

    #1240

    J.D. Grimes
    Keymaster

    I’ve discovered that basically the issue with the avatar upload event is related to a bug in WordPoints core, while the issue with the cover image upload event is kind of caused by BuddyPress core (but we can probably work around it).

    But I’m thinking that maybe both of these events should be changed so that they don’t reverse and award every time that the cover image/avatar is changed, but only award when it is initially set and remove when it is completely deleted (and points would then be awarded again when a new one was set.) So basically, it would have the same result as now, in that the user would have the points as long as they had an avatar/cover image set, but there wouldn’t be all of this unnecessary removing and re-adding of the points each time they change it.

    Separate events could be introduced for when the avatar/cover image is changed from one thing to another. (With rate limits.)

    Any thoughts on that?

    #1241

    J.D. Grimes
    Keymaster

    I’m thinking of having the extension automatically correct users’ points when the update is installed. Would that be good, or did you already manually deduct the extra points?

    #1243

    magland
    Participant

    Sorry tried to reply last week, but had issues logging in to the site for some reason.

    In answer to your questions yes it does seem overkill to award and reverse every time. Awarded on first upload and reversed on delete makes sense. If they upload ones without deleting do nothing…. is that possible?

    It may be nice to rate limit changes but not necessary. 🙂

    If it could correct the points I’m guessing that would be a good thing. Not needed in my particular setting though as I manually reset the users points.

    Thanks again for looking into it.

    #1244

    J.D. Grimes
    Keymaster

    Sorry you were having issues logging in. Did you get any kind of error message? I wonder if it was an anti-spam plugin.

    Anyway, thanks for the feedback. I think what I’ll do for now is just change these events so that they only award on first upload and reverse on delete. I’ll wait until later to possibly introduce additional events for changes, with rate limits.

    I figured that you’d already manually corrected your users’ points. If I have the extension automatically try to correct it on update, it might cause you issues then. It would basically try to recorrect it, which might cause points to be removed again. So maybe I’ll just leave it.

    #1298

    J.D. Grimes
    Keymaster

    Hey @magland,

    Thanks for your patience on this issue. I’ve just released updates for both WordPoints and the BuddyPress extension that should fix these issues for you. Now points are only awarded when the avatar/cover image is set, not when it is replaced, and removed only when it is deleted. Any previous transactions will remain untouched, the extension won’t try to correct them on update.

    If you continue to have issues, let me know.

    Thanks again for being patient on this; it couldn’t be completely fixed without some changes in WordPoints, which is why it took this long to get an update for the extension out. In hindsight, I probably should have considered doing a bugfix release for WordPoints, but I never expected version 2.4.0 to take this long. Hopefully, this hasn’t been too much of an inconvenience. Again, if you have any further issues, let me know.

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.