Tagged: rate limit
- July 17, 2017 at 8:53 am #1231
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!
July 17, 2017 at 9:08 am #1234
- This topic was modified 2 years, 8 months ago by magland.
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.July 17, 2017 at 9:59 am #1235
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!July 18, 2017 at 4:18 pm #1236
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.
July 18, 2017 at 4:31 pm #1238
- This reply was modified 2 years, 8 months ago by J.D. Grimes. Reason: Clarity
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.July 19, 2017 at 4:51 am #1239
Great thanks for looking into this, I’ve had to disable that event for now.July 20, 2017 at 9:30 am #1240
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?July 21, 2017 at 11:27 am #1241
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?July 24, 2017 at 4:08 am #1243
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.July 25, 2017 at 3:28 pm #1244
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.October 26, 2017 at 4:49 pm #1298
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.
- You must be logged in to reply to this topic.